Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-30-2020 07:10 AM
Hi
I was wondering if you can help me please
I would like to return all element, but currently it only returns one element:
This is my schema query:
type Query {
likers: [User]
@cypher(
statement: """
MATCH(u1: User)-[:LIKES]->(u2: User)
RETURN u1,u2
"""
)
}
In the above example, I would like to return both u1
and u2
, however the graphiql only returns u2:
query getLikers {
likers {
firstName
}
}
returns:
{
"data": {
"LikeUser": [
{
"firstName": "user2"
}
]
}
}
Are you able to let me know what I am doing wrong please?
Solved! Go to Solution.
06-01-2020 12:55 PM
Welcome to community! Do you by chance have your schema handy? It'd be easier to help if we can see how you've got the laid out in your GraphQL schema.
06-01-2020 12:55 PM
Welcome to community! Do you by chance have your schema handy? It'd be easier to help if we can see how you've got the laid out in your GraphQL schema.
06-01-2020 01:44 PM
Hi @MuddyBootsCode - thank you for getting back to me and I appreciate the warm welcome!
I spent some more time on this forum and realised that what I was trying to return was a tuple (and my schema was completely wrong - apologies, I am still very new to using this project)
This forum post explained the issue that I was retrying to resolve: GraphQL query returning list of objects
All the sessions of the conference are now available online