Skip to content

Instantly share code, notes, and snippets.

@arnabkd
Created August 20, 2018 09:28
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 arnabkd/58b926b2c126fca17ad62998ac1c2e03 to your computer and use it in GitHub Desktop.
Save arnabkd/58b926b2c126fca17ad62998ac1c2e03 to your computer and use it in GitHub Desktop.
Solved by using aliases and unique key (email)
mutation{
speaker: createSpeaker(data: {
name: "Name"
email: "example@example.com"
workplace_url: "some_workplace_url"
}){
id
}
talkOne: createTalk(data: {
speaker: {
connect: {
email: "example@example.com"
}
}
title: "Test talk one"
session_duration: 45
}){
id
title
session_duration
speaker {
name
}
}
talkTwo: createTalk(data: {
speaker: {
connect: {
email: "example@example.com"
}
}
title: "Test talk two"
session_duration: 30
}){
id
title
session_duration
speaker {
name
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment