interfaces themselves are actually trivial!

This commit is contained in:
Ben Kraft
2020-07-15 17:35:47 -07:00
parent 279228f9a4
commit cf6f57f5f1
5 changed files with 54 additions and 3 deletions
+28
View File
@@ -26,6 +26,34 @@ type User {
authMethods: [AuthMethod!]!
}
interface Content {
id: ID!
name: String!
parent: Topic
}
type Article implements Content {
id: ID!
name: String!
parent: Topic!
text: String!
}
type Video implements Content {
id: ID!
name: String!
parent: Topic!
duration: Int!
}
type Topic implements Content {
id: ID!
name: String!
parent: Topic
children: [Content!]!
}
type Query {
user(query: UserQueryInput): User
root: Topic!
}