unions are easy too, sorta

This commit is contained in:
Ben Kraft
2020-07-15 17:35:47 -07:00
parent d089ab1afb
commit 6f0e5fdf0d
6 changed files with 22 additions and 13 deletions
+3
View File
@@ -32,6 +32,8 @@ interface Content {
parent: Topic
}
union LeafContent = Article | Video
type Article implements Content {
id: ID!
name: String!
@@ -56,4 +58,5 @@ type Topic implements Content {
type Query {
user(query: UserQueryInput): User
root: Topic!
randomLeaf: LeafContent!
}