-
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
[Modern] Difficulty following paginationContainer example #1625
Comments
There's also no examples of the correct way to expose variables defined on the query in the QueryRenderer to the fragment and pagination containers, I'm assuming they'll just available, but I haven't actually managed to get it to compile yet :) |
Okay, so it looks like the issue is in |
This is something we should allow, feel free to send a PR to add the getNullableType if you get to it before we do! |
Fixed the compilation issue in #1637 Managed to get everything working based on the example, just a few things I found out that are not clear:
|
@janicduplessis should the field definition
in the fragment manually. Is that a known bug? |
Yea I had to include what @Zunder did to get my pagination component working again. Very weird since I swore that once I had added the pageInfo and it broke (but maybe I just hadn't recompiled). None of the examples seem to show that you need to include the pageInfo. |
I agree on the case, that the documentation is very hard to follow, impossible if not checking the actual implementation. I started few month ago with graphql. Have one quite complex app implemented with react and react-apollo. I like the approach and idea of relay (I think I understood it quite well). I intend to use relay modern on my current project. I already found many things working much better for me with relay modern, although most of it via checking the implementation and checking issue tracker for the same question, not docs. I understand that it takes time to write full and good docs and it is not an easy task! When you work through the docs, you have a huge gap from QueryRenderer and fragmentContainer to refetch & paginationContainer. It literally goes from straight-forward to confusing.
|
we going to accept a pull request to improve docs on pagination container follow this https://github.com/entria/guidelines/blob/master/relay/flatlist-relaymodern.md if you want to do pagination with refetchContainer instead |
we're hoping to simplify this API a lot soon! |
I'm trying to follow the paginationContainer example, but have a couple of issues:
Firstly, it won't compile:
My EventConnection looks like this
This is unchanged from my old classic-compatible schema.
Secondly, the example specifies the type of the cursor variable as "ID", but the connection spec (as well as graphql-relay-js) defines cursors as "String"
The text was updated successfully, but these errors were encountered: