Auto-resolver for maps in input types #11
Labels
enhancement
New feature or request
module: GraphDB
GraphDB module, convert graph schema to GraphQL schema
module: resolver
module: Schema Validator
Schema validator module, parse GraphQL schema and inference graph database directives
The utility generates or ingests a GraphQL schema, in which input types can be maps. Generating a resolver that inference a single graph query that creates or merge multiple nodes and edges at once, following the map data structure and the schema directives.
Example
The GraphQL schema has a type Person that includes a list of type Todo, and each the Todo includes a list of Comment.
A corresponed set of nested input types: PersonInput, TodoInput, and CommentInput.
The graph database connects the nodes with label person, todo, and comment with edges of type has.
The mutation createNodePerson accept as input a map, validated by the nested input types of the schema, like:
The resolver will parse the input and based of the schema will create a single openCypher query that creates the nodes and the edges at once.
The option merge toggle if a node type in the map is always created or merged, meaning finding and connecting an existing node. The merge option is a list like ["todos", "todos.comments"].
The text was updated successfully, but these errors were encountered: