Graphql
Parameters
{
"query": "{ user(id:$id) { id name } }",
"variables": { "id": 1 }
}
Fragments
query UseFragment {
luke: human(id: "1000") {
...HumanFragment
}
leia: human(id: "1003") {
...HumanFragment
}
}
fragment HumanFragment on Human {
name
homePlanet
}
Input Types
input MessageInput {
content: String
author: String
}
type Mutation {
createMessage(input: MessageInput): Message
updateMessage(id: ID!, input: MessageInput): Message
}