Skip to content

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

@cip22

Description

@cip22

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions