Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

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

Open
dan-fein opened this issue Jan 19, 2021 · 1 comment
Open

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

dan-fein opened this issue Jan 19, 2021 · 1 comment

Comments

@dan-fein
Copy link

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
Copy link
Collaborator

#608

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

No branches or pull requests

2 participants