-
Notifications
You must be signed in to change notification settings - Fork 74
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
Typed @relation schemas are not parsed properly by graphql.idl() #184
Comments
Please note that the existing/old transpiler in neo4j-graphql (the plugin) doesn't support those at all. The new implementation in neo4j-graphql-java does, and should be available under /graphql/experimental. Please try that and report back if it worked. |
Thank you Michael - Using /graphql/experimental (plugin v 3.5.0.4 built from source) does work but requires the query to be modified for the plugin: using the same schema above and the standard format query:
throws an error:
neo4j.log shows a missing field exception:
Using the modified query -- replacing "Person" with the directional "from" does work:
yields:
This is pretty close - /experimental can access the @relation properties, but the semantics are not consistent due the differences in the bindings -- it appears the transpiler is binding to the key
This would be good to fix since it makes the graphql queries not as portable as they could be across the platforms. Application result set parsers would also need to be different depending on the endpoint. |
The |
In the transpiler you can also provide other names in the directive for |
I understand - the point I'm making is that we should try to have graphql operate the same irrespective of whether it's the neo4j js implementation or the neo4j java implementation. This greatly increases the value of leveraging graphql in real applications. One should be able to have interoperable schemas and queries. |
I've now run into this issue. What was the actual fix? |
Schemas with typed
@relation
queries are not parsed properly when published to the Neo4j graphql endpoint using CALL graphql.idl().Given a graphql schema:
and a graphql query:
When the schema is published via neo4j-graphql-js (eg grand-stack-starter) we get the expected result - returning relationship properties (roles)
when the schema is published via the plugin using
CALL graphql.idl('<schema>')
the query fails:modifying the query to:
passes validation, but returns a null array for the
@relation
type and its propertiesThe text was updated successfully, but these errors were encountered: