cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

GraphQL Interface properties do not auto-generated Aggregates

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?

 

1 REPLY 1

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!