Created
March 13, 2020 01:25
-
-
Save ksaldana1/ff13d691c457dcd50569350a7c6d87ff to your computer and use it in GitHub Desktop.
gql_example_2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Query { | |
messages: [Message!]! | |
} | |
type Message { | |
id: ID! | |
text: String! | |
author: MessageAuthor! | |
} | |
union MessageAuthor = User | Guest | |
type User { | |
id: ID! | |
name: String! | |
dateCreated: String! | |
messages: [Message!]! | |
role: USER_ROLE! | |
} | |
enum USER_ROLE { | |
FREE | |
PREMIUM | |
WHALE | |
} | |
type Guest { | |
# Placeholder name to query | |
placeholder: String! | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment