-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto pagination does not work with nested first #149
Comments
Could you share a reproduction on CodeSandbox or StackBlitz? Thanks! |
Have you got a repro template for CodeSandbox or StackBlitz I can fork by anychance? |
Currently we don't have any. I can create one for you if you have issues with those? |
Yeah, if you have a basic template I could use for repros that would be great. |
I created this one but not sure if you use it as an SDK with Node, Browser, ApolloClient or Urql etc. |
I think this PR covers the use case; |
Available in the latest release! |
Thanks @ardatan! I notice when setting first to >5000, I start seeing these errors: AggregateError: The I guess this is unexpected? |
Ah, I see the "skipArgumentLimit" on the auto-pagination transform config. That looks like it'll do the trick. |
Unfortuately not, it seems anything above 5k will fail. |
Ok so I think it is not a good idea to have multiple queries for the pagination of the nested fields because we will need to do multiple queries for each nested field and this might take forever on the client side. |
@ardatan is there a reason skip is being used? I know the docs, recommend against using using skip for fetching a large amount of enities, which is what we need in this use case (which is to get all positions for a user/contract). https://thegraph.com/docs/en/querying/graphql-api/#example-using-and-2 |
@matthewlilley Thanks to
becomes the following so it is way faster then sending multiple queries by waiting each other's "last id"
However we do this when This will take forever :) But still I will take a look at the issue with nested fields with 5000+ records |
Hey @ardatan,
Auto pagination doesn't do anything when first is nested, these should be in the 10s of thousands.
The text was updated successfully, but these errors were encountered: