Pagination and Connection #576
Unanswered
lambrosx77
asked this question in
Q&A
Replies: 2 comments 5 replies
-
@lambrosx77 - the generated connection types are mainly for the simple use case where you just want the fields per the relay spec. For adding additional fields, we are recommending that the user just define them manually. Not sure how easy it would be to support what you describe, but happy to hear your thoughts/ideas around this. |
Beta Was this translation helpful? Give feedback.
5 replies
-
Yes, you have to explicitly define the paginated types in your schema and
also implement it. This is because you want to customize the paginated
types. Codegen does not do anything special for supporting pagination, but
if you have them defined in your schema, you will get the corresponding
generated types for those. We generally follow the relay spec as specified
here: https://relay.dev/graphql/connections.htm
Hope that helps.
…On Fri, Jul 21, 2023 at 4:27 AM Shamsuddin ***@***.***> wrote:
any example can i have for this particular use case, as i am using codegen
to generate files using schema @srinivasankavitha
<https://github.com/srinivasankavitha>
—
Reply to this email directly, view it on GitHub
<#576 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ5JPXME3L2OIXWPVUSAB2LXRJRRBANCNFSM5C4CNBOA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
It should be interesting if we can have the opportunity to add an optional totalCount field to Connection like that:
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions