Closed mschipperheyn closed 5 years ago
https://facebook.github.io/relay/docs/en/graphql-server-specification.html
edges is not supposed to be non null per the spec
Thanks, I figured it out. I was thrown off by the examples in the README that use the non string version of schema definition. The other thing that caught me was the dataloader and the fact that I had to specify a type at the root to be able to load associations (the example does cover that). It's mostly newbie problems and understanding the basic concepts. However, I would recommend replacing the example on the homepage with a string version like in the example. For me, some conceptual explanation also would have helped, although that might be more on the graphl
than the graphql-sequelize
side.
The README examples are from when pretty much only graphql-js existed as a reference implementation. PR to improve documentation is always welcome, it's usually easier as a relative beginner to provide good documentation examples.
Trying to use this with Apollo V2. I have modeled my graphql structure in line with Relay (Connections, Edges, Nodes), but resolver fails because the resulting graphql structure seems a bit different
https://github.com/mickhansen/graphql-sequelize/blob/bbf74bd0d81e0efc53724c5626958add7cc4b2db/src/relay.js#L117
The code expects
connectionType._fields.edges.type.ofType._fields.node.type;
But what it is looks like this:
The nested
_fields
are not there.My Graphql looks like this:
Any suggestions here?