Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@andreystarkov
Created August 15, 2018 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreystarkov/9ca6816a9565003ec9f27934ec2efc97 to your computer and use it in GitHub Desktop.
Save andreystarkov/9ca6816a9565003ec9f27934ec2efc97 to your computer and use it in GitHub Desktop.
export const MUTATION_ADD = gql`
mutation insertLotteryTicketsMutation ($objects: [lottery_tickets_input]){
insert_lottery_tickets(objects: $objects) {
affected_rows
returning {
id
task
completed
}
}
}
`
client.mutate({
mutation: MUTATION_ADD,
variables: {
objects: [
{
ticketId: 3,
timestamp: '1533810845',
openkey: '0xc8c3e8fd5edee41e4fbe60e339a1ad95c0eec829d9f5065037d3368e2a78eca4',
numbers: '11,12,13,14,15'
}
]
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment