Skip to content

Instantly share code, notes, and snippets.

@beeman
Last active September 23, 2018 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beeman/81a9609f39736f04451c5503a5ac2b1d to your computer and use it in GitHub Desktop.
Save beeman/81a9609f39736f04451c5503a5ac2b1d to your computer and use it in GitHub Desktop.
scalar JSON
# input type
input PublishInput {
type: String!
scope: String
payload: JSON
}
input SubscribeInput {
type: String
scope: String
}
# return type
type MessagePayload {
type: String!
scope: String
payload: JSON
}
# Query types
type Query {
messageBus: String
}
type Mutation {
publish(message: PublishInput): MessagePayload
}
type Subscription {
messages(filter: SubscribeInput): MessagePayload
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment