Skip to content

Instantly share code, notes, and snippets.

@viniciusCamargo
Last active February 28, 2018 21:06
Show Gist options
  • Save viniciusCamargo/d18ff392ddfbbf43545a84f7ce7535ce to your computer and use it in GitHub Desktop.
Save viniciusCamargo/d18ff392ddfbbf43545a84f7ce7535ce to your computer and use it in GitHub Desktop.
# fetch the event, all its tickets and each batch of each ticket
node(node_type: EVENT id:X) {
...on Event {
tickets {
nodes {
batches {
nodes {
price
committed_count
sold_count
}
}
}
}
}
}
mutation createDiscount($input: CreateTicketDiscountCouponInput!) {
create_ticket_discount_coupon(input: $input) {
... on TicketDiscountCoupon {
id
code
created_at
}
... on ValidationErrors {
errors
}
}
}
// query variables
{
"input": {
"event_id": "9a62df05-062d-41fe-bbe2-98634485f88e",
"code": "xwololo50",
"total_available": 1,
"discount_percentage": 1,
"discount_cents": 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment