-
Notifications
You must be signed in to change notification settings - Fork 305
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
Schema inspection should check actual paginated type name rather than deriving it from the Connection type name #1053
Comments
Hello @njuro, thanks for reaching out. Is your application manually registering such types and data fetchers? Your code snippet is showing the schema part, but I'm wondering what's actually done by the application for this. As far as I remember, our Ideally, a minimal sample application should help us discuss this issue. Can you provide one? |
Hi @bclozel thanks for the swift reply! We are actually using Netflix DGS framework and right now are trying to migrato to the new starter ( |
From what I can see, DGS is also following the type+connection/edge/node convention. So, back to my question: how are those types supported in the first place in your application? |
We are writing the schema manually and then generating the objects with dgs-codegen plugin. However, we are not using the |
If typed and data fetchers are present in the graphql engine at the time of schema introspection, then this should not be raised as a warning. I'm probably missing something though. Could you share a minimal sample application so E can have a look, please? |
I think I see the problem. At the moment, the schema inspection derives the paginated type from the |
Thank you @rstoyanchev, that's exactly the problem! Sorry I didn't make myself clear at first. |
Hello, we have following connection types defined in our GraphQL schema:
these conforms to the Relay Cursor Connections specification. However, using this schema with
Spring GraphQL
results in following error, produced bySchemaMappingInspector
:No node type for EntityOwnerConnection.
Upon inspecting the code it is obvious, that the inspector expects every connection type
FooConnection
to have edge types withnode
field of typeFoo
. But the Relay Connection spec doesn't say anything about the names of the node types (nor edge types), only about the name of connection types. Imho it can be merely considered a good practice, but it shouldn't be something that is enforced through hard assert. This expectation also isn't explictly stated anywhere inSpring GraphQL
documentation. Am I missing something?The text was updated successfully, but these errors were encountered: