Skip to content

Instantly share code, notes, and snippets.

@valikos
Last active May 9, 2019 17:00
Show Gist options
  • Save valikos/eff88601db0b9a2bbe4d0b230d49d741 to your computer and use it in GitHub Desktop.
Save valikos/eff88601db0b9a2bbe4d0b230d49d741 to your computer and use it in GitHub Desktop.
schema {
query: Query
mutation: Mutation
}
type Query {
character(id: ID!): CharacterType
}
schema {
query: Query
mutation: Mutation
subscription: Subscription
}
input CharacterAttributes {
firstName: String!
lastName: String
role: RoleEnum!
}
mutation CreateCharacter(
$firstName: String!
$lastName: String
$role: RoleEnum!
) {
createCharacter(
firstName: $firstName
lastName: $lastName
role: $role
) {
firstName, lastName, role
}
}
mutation CreateCharacter($input: CharacterAttributes!){
createCharacter(input: $input) {
firstName
lastName
role
}
}
mutation CreateCharacter {
createCharacter(
firstName: 'Finn'
lastName: 'The Human'
role: 'Hero'
) {
firstName
lastName
role
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment