interface Entity @query {
id: ID!
name: String
}
type Foo implements Entity @entity {
id: ID!
name: String
foo: Int
}
type Bar implements Entity @entity {
id: ID!
name: String
bar: Int
}
query {
entities {
id
name
... on Foo {
foo
}
... on Bar {
bar
}
}
}
Example usage