-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Currently envio does not support the use of interfaces in the GraphQL schema (see: https://graphql.org/learn/schema/#interface-types).
Interfaces allow this type of data structure and help in indexing entities with a generic structure and contracts with inheritance
Example:
interface ITest {
id: ID!
common: String!
}
type TestA implements ITest {
id: ID!
common: String!
a: String!
}
type TestB implements ITest {
id: ID!
common: String!
b: String!
}
type Entity {
id: ID!
test: ITest
}
query getEntity($id: ID!) {
entity(id: $id) {
id
test {
common
... on TestA {
id
a
}
... on TestB {
id
b
}
}
}
}
Metadata
Metadata
Assignees
Labels
No labels