Skip to content
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

Using neo4j-graphql-py for resolving part of a query #13

Open
cip22 opened this issue Sep 28, 2022 · 0 comments
Open

Using neo4j-graphql-py for resolving part of a query #13

cip22 opened this issue Sep 28, 2022 · 0 comments

Comments

@cip22
Copy link

cip22 commented Sep 28, 2022

In my project not all types from the graphQL schema correspond to a label in neo4j.
That means that I have resolvers that are supposed to resolve only parts of the query using neo4j-graphql-py. Are there common usage patterns for this scenario? I'm particularly interested in retrieving the correct subgraph from the 'main' query.

In the following example, Customer and Location are GraphQL types and labels in neo4j, while GeoFeature is not.

{ GeoFeature (customerId: '200020') {
customer {
name
location {
lat
lon
}
id
}
}}

The resolver for the type GeoFeature is a custom function, while customer should be resolved with neo4j-graphql-py so that I don't need to touch the code when additional fields of the customer node are required in the query.
Any ideas? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant