Skip to content

Commit

Permalink
docs(README): clarify that relations are -to-many
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaSemenov committed Apr 16, 2022
1 parent 1cc5d16 commit 523c9dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ query user_with_posts {

## Pagination

Root queries and one-to-many nested relations can be paginated.
Root queries and -to-many nested relations can be paginated.

Example:

Expand Down Expand Up @@ -356,12 +356,12 @@ const resolveGraph = GraphResolver(
}
},
}),
// Select all objects in one-to-many relation
// Select all objects in -to-many relation
comments: true,
comments_page: RelationResolver({
// Model field, if different from GraphQL field
modelField: "comments",
// Paginate subquery in one-to-many relation
// Paginate subquery in -to-many relation
paginate: CursorPaginator(
// Pagination options
// Default: { take: 10, fields: ["id"] }
Expand All @@ -373,7 +373,7 @@ const resolveGraph = GraphResolver(
fields: ["name", "-id"],
}
),
// Enable filters on one-to-many relation
// Enable filters on -to-many relation
filters: true,
// Modify subquery
modifier: (query, { args }) =>
Expand Down
2 changes: 1 addition & 1 deletion docs/pagination.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pagination

Root queries and one-to-many nested relations can be paginated.
Root queries and -to-many nested relations can be paginated.

## Paginators

Expand Down

0 comments on commit 523c9dd

Please sign in to comment.