neo4j-graphql / neo4j-graphql-js

NOTE: This project is no longer actively maintained. Please consider using the official Neo4j GraphQL Library (linked in README).
Other
609 stars 147 forks source link

Does neo4j-graphql-js support Virtual Nodes? #575

Open dan-fein opened 3 years ago

dan-fein commented 3 years ago

Hi I can run this query in Neo4j's Desktop browser but when doing it in GraphQL it returns "Cannot return null for non-nullable field X"

This is my query:

    OPTIONAL MATCH (u:User { username: "dan"})-[r:FOLLOWS]->(something)-[:WROTE|TAGGED]-(post:Post)
    CALL apoc.create.vNode(labels(post), post)
        YIELD node AS vChild
    WITH COLLECT(vChild) as rows
    OPTIONAL MATCH (this)-[:WROTE]->(post:Post)
    WITH rows + COLLECT(post) as allRows
    UNWIND allRows as post
    RETURN DISTINCT post
    ORDER BY post.date DESC

I believe it's because it's a virtual node, maybe that's not supported by Neo4j-graphql-js?

michaeldgraham commented 3 years ago

https://github.com/neo4j-graphql/neo4j-graphql-js/issues/608