Cannot read property 'isInt' of undefined

Hello,
I'm running a very simple graphql query via the graphql cli tool.
I get the error: "Cannot read property 'isInt' of undefined".
Any idea why?

query test($name: String) {
Person(name: $name) {
first,
last
}
}

Thanks

Hello Eric, I see you're using a function with parameters are you correctly passing those in via the graphiql tools? You might want to try manually passing the parameter to ensure that it's working that way.

I invoke the cli tool as follow:
graphql query test "Joe smith"

It's working fine using the grahpql service in a browser.

What does your GraphQL Schema look like? I'm assuming:

type Person {
firstName: String,
lastName: String
}

If that's the case you need to have a corresponding variable in your query, with what you currently have it I think it would be:

query test($name: String){
Person(first: $name){
first,
last}
}

I'm not sure your schema is quite matching up with your query.

The query matches the schema. It works using the graphql service in a browser but not with the cli tool. It seems something is not configured properly with the cli tool. That's the stacktrace I get:

"TypeError: Cannot read property 'isInt' of undefined",
" at /app/node_modules/neo4j-graphql-js/dist/utils.js:224:25",
" at baseClone (/app/node_modules/neo4j-graphql-js/node_modules/lodash/lodash.js:2627:67)",
" at Function.cloneDeepWith (/app/node_modules/neo4j-graphql-js/node_modules/lodash/lodash.js:11121:14)",
" at extractQueryResult (/app/node_modules/neo4j-graphql-js/dist/utils.js:223:31)",
" at _callee$ (/app/node_modules/neo4j-graphql-js/dist/index.js:114:76)",
" at tryCatch (/app/node_modules/@babel/runtime-corejs2/node_modules/regenerator-runtime/runtime.js:45:40)",
" at Generator.invoke [as _invoke] (/app/node_modules/@babel/runtime-corejs2/node_modules/regenerator-runtime/runtime.js:271:22)",
" at Generator.prototype. [as next] (/app/node_modules/@babel/runtime-corejs2/node_modules/regenerator-runtime/runtime.js:97:21)",
" at asyncGeneratorStep (/app/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:5:24)",
" at _next (/app/node_modules/@babel/runtime-corejs2/helpers/asyncToGenerator.js:27:9)"

How are you passing the variable? Here's an example from a project I've worked on so it won't match your query of course:


But it's the proper way to pass the variable. If you feel like you can you might share, your type definition and if you're using Neo4j-graphql-js as well.

Thanks for your replies. I figured it out. I needed to clear the npm cache and reinstall core-js. It's working now

Glad you got it working.