Is there a way to add custom scalars with neo4j graphql library.
I am using neo4j 4.4 with apollo server.
I want to write a query for my graphql API that returns the result the following cypher query from my database :
match (p:PATENT {app_num : "17037200"})
CALL apoc.path.subgraphNodes(p, {
relationshipFilter: "IS_PARENT_OF"
})
YIELD node
with distinct node as p
optional match (parent:PATENT)-[:IS_PARENT_OF]->(p)
with distinct parent as unique_parent ,p
with collect(unique_parent.app_num) as parents, p
optional match (p)-[:IS_PARENT_OF]->(child:PATENT)
with distinct child as unique_child ,p, parents
with collect(unique_child.app_num) as children, p.app_num as application, parents
return application, parents, children
This returns a json type structure and I want this custom query to be served at my apollo API as a data point.
What are my options ?