Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-11-2020 07:30 AM
Hi
I'm a relative NooB to graphql I'm struggling to learn the query language when I hit this problem
I've upgraded to the version "neo4j-driver": "^4.0.1",
Using graphql and automatically generating a schema using the driver which puts in pagination definition into the schema, I've checked
const { makeAugmentedSchema, inferSchema } = require('neo4j-graphql-js');
When I spin up graphql and test a simple query it works fine
query { Capability { ID } }
But put a pagination directive in to bring back the first two and the server barfs
query { Capability (first: 2) { ID } }
I think the problem is that the integer is being interpreted as a float be good to get someone else to confirm the observation or recogmend a possible solution
{
"errors": [
{
"message": "LIMIT: Invalid input. '2.0' is not a valid value. Must be a non-negative integer.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"Capability"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR",
"exception": {
"code": "Neo.ClientError.Statement.ArgumentError",
"name": "Neo4jError",
"stacktrace": [
"Neo4jError: LIMIT: Invalid input. '2.0' is not a valid value. Must be a non-negative integer.",
"",
03-25-2020 09:00 AM
I recently ran into the same problem and opened an issue against the JS driver:
Based on the discussion there, this isn't a bug. The fact that it ever worked was unintentional.
All the sessions of the conference are now available online