Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 3abc57c

Browse files
CoreyKovalikmachi1990
authored andcommitted
docs: update code sample for N+1 queries for graphback crud service findBy method
1 parent 34a932e commit 3abc57c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/resolvers/custom-resolvers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const { items: allNotes } = await context.Notes.findBy(args, context, info);
146146
const noteIds = allNotes.map(({ id }) => id);
147147

148148
// retrieves comments owned by notes selected above. Specifying the "comments" path so start selection
149-
const { items: comments } = await context.Comment.findBy({noteId: {in: noteIds}}, context, info, 'comments');
149+
const { items: comments } = await context.Comment.findBy({ filter: { noteId: { in: noteIds } } }, context, info, 'comments');
150150

151151
// ... do the rest
152152
```

website/versioned_docs/version-0.16.x/resolvers/custom-resolvers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const { items: allNotes } = await context.Notes.findBy(args, context, info);
146146
const noteIds = allNotes.map(({ id }) => id);
147147

148148
// retrieves comments owned by notes selected above. Specifying the "comments" path so start selection
149-
const { items: comments } = await context.Comment.findBy({noteId: {in: noteIds}}, context, info, 'comments');
149+
const { items: comments } = await context.Comment.findBy({ filter: { noteId: { in: noteIds } } }, context, info, 'comments');
150150

151151
// ... do the rest
152152
```

website/versioned_docs/version-1.0/resolvers/custom-resolvers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const { items: allNotes } = await context.Notes.findBy(args, context, info);
146146
const noteIds = allNotes.map(({ id }) => id);
147147

148148
// retrieves comments owned by notes selected above. Specifying the "comments" path so start selection
149-
const { items: comments } = await context.Comment.findBy({noteId: {in: noteIds}}, context, info, 'comments');
149+
const { items: comments } = await context.Comment.findBy({ filter: { noteId: { in: noteIds } } }, context, info, 'comments');
150150

151151
// ... do the rest
152152
```

0 commit comments

Comments
 (0)