Closed sibelius closed 7 years ago
@sibelius , what would this require? If you could provide a roadmap for this I could help. I'm starting again with Relay after a year and I've heard viewer
is being depreciated.
[ ] send a PR to remove Viewer from our boilerplate https://github.com/entria/graphql-dataloader-boilerplate/issues/46 (move all fields from Viewer to QueryType, and refactor the rest of code)
[ ] send a PR to remove Viewer from this boilerplate
let me know if you need any help
Hey @sibelius . thanks! I'm using my own server/schema and just got it working, I'm using Absinthe but I'll see about a PR here and there when I get a chance. This starter has been a great help getting up to speed with Modern. The only snag I've had has been passing after: null
to a non-js backend. But I think that's what the spec says so I'd rather not implement a work-around.
@sibelius , so is it UserList_me
?
that doesn't make sense actually, shouldn't the type just be UserList
? It's at the root so the users
field is on directly on props
, not nested. But since it has to be <module>_<prop>
could we just expose it as UserList_data
as data
is the field at the root of the query?
I think this could work
https://github.com/sibelius/ReactNavigationRelayModern/blob/master/src/UserList.js#L115
instead of
fragment UserList_query on Query
@sibelius , thanks, but I'm having a hard time with this one because I haven't used fragments in a while: so
query: graphql`
fragment UserList_query on Query{
users( ...
then I have to do
query: graphql`
query UserListPaginationQuery (
$count: Int!,
$cursor: String
) {
...UserList_query
}
because there is no field query
on Query; however, then there are no fields in the graphql response
Object {__fragments: Object, __id: "client:root"}
It is something like that, remember that Relay mask the data, only the component that asks for the data will see it this data
success! 🎉
Thanks, yes, I forgot that, but had my query={props.query}
needed to be query={props}
Submitting PR!
depends on https://github.com/entria/graphql-dataloader-boilerplate/issues/46