Skip to content

Commit 86f6668

Browse files
committed
Revert "Fix code style issues with Prettier"
This reverts commit 087db74.
1 parent 9684ced commit 86f6668

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

README.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
# TypeORM-GraphQL-Joiner
2-
32
Builds a list of TypeORM entity relations to be joined based on object fields selected in a GraphQL query.
43

54
When your GraphQL server is backed by TypeORM entities, you may have object relationships like the following example:
65

76
```json5
87
{
98
// Product entity
10-
product: {
11-
id: '1234',
12-
name: 'Some product',
9+
"product": {
10+
"id": "1234",
11+
"name": "Some product",
1312
// nested Owner entity
14-
owner: {
15-
id: '4321',
16-
name: 'Some owner',
17-
},
18-
},
13+
"owner": {
14+
"id": "4321",
15+
"name": "Some owner"
16+
}
17+
}
1918
}
2019
```
2120

@@ -118,12 +117,7 @@ object rather than the object directly. In this case you can pass a `path` strin
118117
import { GraphQLResolveInfo } from 'graphql';
119118

120119
// Example resolver function for a "createProduct" mutation in your GQL schema
121-
async function createProduct(
122-
source: any,
123-
args: any,
124-
context: any,
125-
info: GraphQLResolveInfo,
126-
): Promise<CreateProductPayload> {
120+
async function createProduct(source: any, args: any, context: any, info: GraphQLResolveInfo): Promise<CreateProductPayload> {
127121
const connection = getConnection();
128122
const relationMapper = new RelationMapper(connection);
129123

0 commit comments

Comments
 (0)