0

How would I add the aggregation and grouping to a subgraph deployed as a hosted service on thegraph protocol? The schema.graphql does not support adding a type Query{...} or a type object in general such as

type Aggregated{
  field: String!
  value: String!
}

When I try to add these, I am getting Aggregated: - Defined without @entity directive- Missing field: id: ID!

Do you know any example subgraphs that support grouping? Thanks

1 Answer 1

0

field id is mandatory,

try this

type Aggregated{
  id: ID! 
  field: String!
  value: String!
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.