Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-28-2022 06:22 AM - edited 07-28-2022 06:37 AM
Firstly I am new to Neo4j so excuse any naive questions.
I'm using GraphQL (Apollo server) against a Neo4j DB. I am getting Aggregates auto generated for me for my 'type' properties but not for my 'interface' properties. Is there a way to get aggregations for my interface types?
An example GraphQL schema is:
interface Production {
title: String!
actors: [Actor!]!
}
type Movie implements Production {
title: String!
actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn")
runtime: Int!
}
type Series implements Production {
title: String!
actors: [Actor!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn")
episodes: Int!
}
interface ActedIn @relationshipProperties {
role: String!
}
type Actor {
name: String!
actedIn: [Production!]! @relationship(type: "ACTED_IN", direction: OUT, properties: "ActedIn")
}
With this schema the following are both correct:
query{ movies{ actorsAggregate{count} } }
query{ series{ actorsAggregate{count} } }
However the following is not correct as 'actedInAggregate' is not present or has not been generated in the schema.
query{ actors{ actedInAggregate {count} } }
I would really like some guidance of if this is possible and if not why not?
08-03-2022 05:54 AM
Hi @RichardBonnett, I'm afraid this is just an unsupported feature at the moment.
Feel free to raise a feature request at https://github.com/neo4j/graphql/issues/new/choose so we can keep track of this.
Thanks!
All the sessions of the conference are now available online