-
Notifications
You must be signed in to change notification settings - Fork 147
TypeError: Cannot read property 'selections' of undefined #145
Comments
Hello , can you give us the code of your back end api ? in where you consume the mutation please ? |
Sure. My index.js:
My graphql-schema.js:
At this point I am only testing the mutation in the GraphQL Playground/editor. |
Can you send me screen shot of your GraphQL Playground/editor reponse ? |
@Banhawy It seems we assume mutations will return object types, and not scalars. As a workaround can you try returning the
NOTE: I also changed your Cypher query a bit - |
I seem to be running into a similar issue, but on the Query type:
resulting in the following playground response:
I tried adjusting the query to return an array of the User types:
which creates the following playground error:
I've tried testing these in Neo4j desktop (I have the graphql plugin installed) and the queries seem work fine from that perspective. Re: the second error, I'm wondering if it is related to the My environment is set up nearly identically as @Banhawy (src.js files) except that I'm running 3.5. Thoughts/help appreciated. |
Did some more digging into the second error. Might be more related to https://github.com/neo4j-graphql/neo4j-graphql-js/issues/159. The apoc statement doesn't include a blank object in the second parameter reference adding a blank |
Another example of this issue: https://community.neo4j.com/t/neo4j-grapql-js-custom-cypher-query/5017 |
Fixed in #200 |
I have the following GraphQL schema:
I am trying to create a mutation that can update a user's social media url where that social media type is a labeled node in neo4j. The problem I get is that the GraphQL mutation doesn't execute. The following mutation:
gives me the following error stack:
Is there a way to get this working to match the GraphQL mutation format?
Neo4j Version: 3.4.1 Enterprise
neo4j-graphql Version: 3.4.0.1
The text was updated successfully, but these errors were encountered: