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.
{
"data": {
"CreateIncident": null
},
"errors": [
{
"message": "Cannot read property 'value' of undefined",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"CreateIncident"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"exception": {
"stacktrace": [
"TypeError: Cannot read property 'value' of undefined",
" at /apollo-server/node_modules/neo4j-graphql-js/dist/index.js:308:53",
" at Array.find (native)",
" at cypherMutation (/apollo-server/node_modules/neo4j-graphql-js/dist/index.js:307:27)",
" at _callee$ (/apollo-server/node_modules/neo4j-graphql-js/dist/index.js:65:31)",
" at tryCatch (/apollo-server/node_modules/regenerator-runtime/runtime.js:62:40)",
" at Generator.invoke [as _invoke] (/apollo-server/node_modules/regenerator-runtime/runtime.js:296:22)",
" at Generator.prototype.(anonymous function) [as next] (/apollo-server/node_modules/regenerator-runtime/runtime.js:114:21)",
" at step (/apollo-server/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)",
" at /apollo-server/node_modules/babel-runtime/helpers/asyncToGenerator.js:35:14",
" at new Promise (<anonymous>)"
]
}
}
}
]
}
If I change reference to ID! instead of String! it works fine. Am I doing something wrong (im new to graphql and neo4j or is there an issue with non nullable properties?
Thanks for any help.
This appears to be the offending part in neo4j-graphql-js: dist/index.js
varfirstIdArg=args.find(function(e){return(0,_graphql.getNamedType)(e).type.name.value;//reference as a NonNullType doesn't have type.name?});if(firstIdArg){varargName=firstIdArg.name.value;if(params.params[argName]===undefined){query+='SET '+variableName+'.'+argName+' = apoc.create.uuid() ';// this is another issue as it assumes you have apoc installed in neo4j }}
Using the following dependencies:
This Apollo Server definition:
This type definition:
Then in GraphQL Playground (using the auto generated mutation) running:
I get the following error:
If I change reference to ID! instead of String! it works fine. Am I doing something wrong (im new to graphql and neo4j or is there an issue with non nullable properties?
Thanks for any help.
This appears to be the offending part in neo4j-graphql-js: dist/index.js
console.log(args):
The text was updated successfully, but these errors were encountered: