Skip to content

Instantly share code, notes, and snippets.

@javierfernandes
Last active October 9, 2017 11:15
Show Gist options
  • Select an option

  • Save javierfernandes/ad076e2d1a640d2f7712fa063b01cd4e to your computer and use it in GitHub Desktop.

Select an option

Save javierfernandes/ad076e2d1a640d2f7712fa063b01cd4e to your computer and use it in GitHub Desktop.
Sample GraphQL Schema for testing subscriptions Mmedium article
type Object {
project: String
id: Int!
properties: JSON // kind of a mixed type
}
Mutation: {
updateObject(input: UpdateObjectInput) : Object
}
input UpdateObjectInput {
project: String!
id: Int!
property: String!
value: String!
}
Subscription: {
objectUpdated(project: String!): ObjectPropertyChanged
}
type ObjectPropertyChanged {
project: String!
id: Int!
property: String!
value: String!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment