Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

241
Views
Why using the count function in neo4j with graphql returns two values ​called low and high?

If I execute the following cypher in Neo4j browser returns the expected values

MATCH (n:Document)
RETURN { 
    year: n.year ,
    countdocs : COUNT(n) 
}

Result:

{"countdocs":3,"year":"2018"}    

But If I execute the same cypher in neo4j-graphql

type Query {
    totalActivityOverTime: [JSONObject] @cypher(statement: """
       MATCH (n:Document)
        RETURN { 
         year: n.year ,
         countdocs : COUNT(n) 
       }
    """) 
}

returns :

  {
    "countdocs": {
      "low": 3,
      "high": 0
    },
    "year": "2018"
  },

What means the values ​​low and high?

Thanks!

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

I think it depends on the type of countdocs. As far as I know, if you define 'countdocs' as BigInt in neo4j-graphql, it returns a dict with {"low": Int, "high": Int} in order to represent 64bit integers. Define countdocs as Int in the schema should resolve the issue. Int type supports up to 53-bit values

about 4 years ago · Juan Pablo Isaza Report

0

Thanks to @Sbunzini and @stdob-- I found the solution:

Schema:

type Activity{
  year: String
  countdocs: Int
}

type Query {
    totalActivityOverTime: [Activity] @cypher(statement: """
       MATCH (n:Document)
        RETURN { 
         year: n.year ,
         countdocs : COUNT(n) 
       }
    """) 
}

GraphQL:

{
  totalActivityOverTime{
    year
    countdocs 
  }
}

Thanks!

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!