cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Possible bug in Neo4j-Driver 4.0.1 for JavaScript - pagination broken

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

ERROR

{
"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.",
"",

1 REPLY 1

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.

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online