Skip to content

Commit 6dc70fa

Browse files
committed
Reformat README.md
1 parent 86f6668 commit 6dc70fa

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

README.md

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

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

6-
```json5
7+
```
78
{
89
// Product entity
910
"product": {
@@ -117,7 +118,12 @@ object rather than the object directly. In this case you can pass a `path` strin
117118
import { GraphQLResolveInfo } from 'graphql';
118119

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

0 commit comments

Comments
 (0)