You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.
Building upon the solution presented by @Crodaycat (thanks!!) on this issue: 256
A problem exists when cypherMutation is called using a nested selection to return both the created node and the related node when additional labels are in use.
CreateNodeA(id: "nodeA", nodeBId: "nodeB") {
id
nodeB {
id
}
}
"stacktrace": [
"TypeError: Cannot read property 'tenantLabel' of undefined",
" at eval (lodash.templateSources[5]:5:25)",
" at /workspace/node_modules/neo4j-graphql-js/dist/utils.js:532:7",
" at Array.map (<anonymous>)",
" at getAdditionalLabels (/workspace/node_modules/neo4j-graphql-js/dist/utils.js:529:32)",
" at relationFieldOnNodeType (/workspace/node_modules/neo4j-graphql-js/dist/translate.js:266:681)",
" at buildCypherSelection (/workspace/node_modules/neo4j-graphql-js/dist/selections.js:442:76)",
" at recurse (/workspace/node_modules/neo4j-graphql-js/dist/selections.js:97:33)",
" at buildCypherSelection (/workspace/node_modules/neo4j-graphql-js/dist/selections.js:553:17)",
" at nodeCreate (/workspace/node_modules/neo4j-graphql-js/dist/translate.js:1458:69)",
" at translateMutation (/workspace/node_modules/neo4j-graphql-js/dist/translate.js:1267:12)"
]
This problem only exists when a custom mutation is in use which leverages cypherMutation to create the raw cypher for the mutation and extends it (in the above use case, to also create the relation to node B). In the normal use case for creating a node with the neo4j-graphql-js generated "CreateNodeA" mutation, we would never be in the situation of selecting a relationship on creation since relations are not created yet
The text was updated successfully, but these errors were encountered:
wworrall
changed the title
cypherMutation function fails when using additional labels and a selection across relations
cypherMutation function errors when attempting a selection across relation when using additional labels directive
Aug 28, 2020
Building upon the solution presented by @Crodaycat (thanks!!) on this issue: 256
A problem exists when cypherMutation is called using a nested selection to return both the created node and the related node when additional labels are in use.
This problem only exists when a custom mutation is in use which leverages cypherMutation to create the raw cypher for the mutation and extends it (in the above use case, to also create the relation to node B). In the normal use case for creating a node with the neo4j-graphql-js generated "CreateNodeA" mutation, we would never be in the situation of selecting a relationship on creation since relations are not created yet
The text was updated successfully, but these errors were encountered: