Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

239
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda