-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Please explain how cursors/connections work #1150
Comments
Your question is not related to Relay.
You may read how connection works here:
For you, I can recommend use graffiti-mongoose - a wrapper for graphql and mongoose.
But The brave implementation of cursors for mongodb I don't find yet. Be aware with So if you find good realisation for mongodb and cursors, please let me know. |
When I create a connection query and execute it with:
someQuery(first: 3) { ... }
This will give me the first 3 result and the cursors if I requested it.
Then if I do this:
someQuery(first: 3, after: "abcdefg12345"){ ... }
This will give the NEXT 3 items after the passed cursor.
But If I observer the server, I can see the resolver working and hitting the server. HOWEVER, if the first query returned only 3 due to a limit (i.e. MongoCollection.find(...).limit(args.first)), then the second query with the cursor will NOT return the next set of 3 even if a skip() was applied to the mongo query.
Yet I still see the request being made to the server and the resolver working.
Why??
If the output has changed because of other arguments, and if the request was still made to the server, why does the cursor prevent me from seeing the new data set??
The text was updated successfully, but these errors were encountered: