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

Unable to use a map projection #564

Open
dan-fein opened this issue Jan 2, 2021 · 3 comments
Open

Unable to use a map projection #564

dan-fein opened this issue Jan 2, 2021 · 3 comments

Comments

@dan-fein
Copy link

dan-fein commented Jan 2, 2021

I have the below cypher directive, which returns if you run it in the Neo4j browser (swapping out this)

 homepage_posts: [Post] @cypher(statement: """
        MATCH (this)-[:FOLLOWS]->(something)-[:WROTE|TAGGED]-(post:Post)
        WITH post, ('User' IN labels(something)) AS followingAuthor
        RETURN DISTINCT post{.*, followingAuthor: followingAuthor}
        ORDER BY post.date
    """),

However, when I run this as a query using neo4j-graphql-js, it does not return. Instead it gives this error: ERROR [Error: Expected to find a node at ref slot 0 but found Map{...} instead

It does return if I get rid of the map projection ({.*, followingAuthor: followingAuthor}), so that's definitely where my problem appears to be. Is this perhaps unsupported by neo4j-graphql-js?

Thank you in advance!

@dan-fein
Copy link
Author

dan-fein commented Jan 4, 2021

Is this something that should be working with this package?

@Kubera2017
Copy link

No, it waits only for Node type now

@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

3 participants