Last active
March 6, 2020 18:34
-
-
Save DanielCender/bb02f4c1dcc127584e56c63d51107fa8 to your computer and use it in GitHub Desktop.
A sample subscription on an Order type
This file contains 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
const gql from 'graphql-tag'; | |
const onCreateOrderByCustomer = gql` | |
mutation OnCreateOrder($orderCustomerId: ID) { | |
onCreateOrder(orderCustomerId: $orderCustomerId) { | |
id | |
orderCustomerId | |
customer { | |
id | |
name | |
} | |
barista { | |
id | |
name | |
} | |
} | |
} | |
`; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mutation should be subscription