Last active
February 28, 2018 21:06
-
-
Save viniciusCamargo/d18ff392ddfbbf43545a84f7ce7535ce to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 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 | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains hidden or 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
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