-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
Subgraph consumers can currently only filter and sort on the basis of top-level entity fields. As a consumer, I want to be able to filter and sort on the basis of child entity fields.
Schema:
type Author @entity {
id: ID!
genre: Genre
userProfile: User @derived(field: "id")
}
type User @entity {
id: ID!
dateOfBirth: String
country: String
}Query:
query {
authors(where: {userProfile: { dateOfBirth_eq: "1987-04-03" } }) {
id
}
}- Will there need to be a limit on how many layers deep a filter can be applied? Restrict at one level, at least to begin with
- Are there any considerations around arrays of child entities, vs. single child entities?
- How will this work with interfaces?
- Will there be a conflict between
userProfile: "12345"and the nested filter? Will need to be a union of a String and an object, or make a breaking change
Meta-task: compare with syntax from other projects