Si ejecuto el siguiente cifrado en el navegador Neo4j, devuelve los valores esperados
MATCH (n:Document) RETURN { year: n.year , countdocs : COUNT(n) }Resultado:
{"countdocs":3,"year":"2018"}Pero si ejecuto el mismo cifrado en neo4j-graphql
type Query { totalActivityOverTime: [JSONObject] @cypher(statement: """ MATCH (n:Document) RETURN { year: n.year , countdocs : COUNT(n) } """) }devoluciones :
{ "countdocs": { "low": 3, "high": 0 }, "year": "2018" },¿Qué significan los valores bajo y alto?
¡Gracias!
Creo que depende del tipo de countdocs . Hasta donde yo sé, si define 'countdocs' como BigInt en neo4j-graphql, devuelve un dict con {"low": Int, "high": Int} para representar enteros de 64 bits. Definir countdocs como Int en el esquema debería resolver el problema. El tipo Int admite valores de hasta 53 bits
Gracias a @Sbunzini y @stdob, encontré la solución:
Esquema:
type Activity{ year: String countdocs: Int } type Query { totalActivityOverTime: [Activity] @cypher(statement: """ MATCH (n:Document) RETURN { year: n.year , countdocs : COUNT(n) } """) }GráficoQL:
{ totalActivityOverTime{ year countdocs } }¡Gracias!