I have mutation which works on graphiQL:
mutation ADDRELEASE{
createRelease(release: {
title: "Release Title"
releaseType: "Album"
}) {
title
id
}
}
I'm tryng to use apollo client with graphql-tag and set mutation variables like this:
const CREATE_RELEASE = gql`
mutation($release: {
$title: String
$releaseType: String
}){
createRelease(release: {
title: $title
releaseType: $releaseType
}){
id
}
}
`
I guess it's matter of syntax. Can't figure out how to make it work.