Skip to content

Instantly share code, notes, and snippets.

@ksaldana1
Created March 13, 2020 01:38
Show Gist options
  • Save ksaldana1/c345cae3bab5cddc8f71e35ca95d68d6 to your computer and use it in GitHub Desktop.
Save ksaldana1/c345cae3bab5cddc8f71e35ca95d68d6 to your computer and use it in GitHub Desktop.
gql_4_5
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