Skip to content

Instantly share code, notes, and snippets.

@DanielCender
Last active March 6, 2020 18:34
Show Gist options
  • Save DanielCender/bb02f4c1dcc127584e56c63d51107fa8 to your computer and use it in GitHub Desktop.
Save DanielCender/bb02f4c1dcc127584e56c63d51107fa8 to your computer and use it in GitHub Desktop.
A sample subscription on an Order type
const gql from 'graphql-tag';
const onCreateOrderByCustomer = gql`
mutation OnCreateOrder($orderCustomerId: ID) {
onCreateOrder(orderCustomerId: $orderCustomerId) {
id
orderCustomerId
customer {
id
name
}
barista {
id
name
}
}
}
`;
@joewired
Copy link

joewired commented Mar 6, 2020

mutation should be subscription

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment