-
Notifications
You must be signed in to change notification settings - Fork 1.8k
-
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
Does every List type need to be a Connection? #171
Comments
Not all list type are required to be in a Connection. If you don't need any pagination logic, it's sufficient to just have the field return an array of events I noticed a few things that might cause problems in your current setup:
|
I tried specifying the fragment to be plural and I got an error:
I only want to give a single user ID and get a list of events back for them. I guess I don't need to make it plural. I still can't get it working. This is a root field with one argument that queries a single node. My server returns multiple Events, but relay is only picking up the first one for some reason. Any other ideas what might be causing this? I don't need pagination, etc. so don't need a Connection... |
Yes that solves it. Thanks! |
I'm trying to return a list of event items. My server correctly returns the following:
My component is only being provided with the first item in the list though, i.e. the event with ID 8, instead of the whole list. Here's my component:
And the route:
Looking at the examples (todo, the one in relay-starter-kit) I can see that all of the list types are wrapped in Connection objects that provide metadata. Is this a requirement? I'd have expected the above to work and to be able to extend it in future by changing it to a Connection object when I needed to, instead of having to do it to begin with.
The text was updated successfully, but these errors were encountered: