GraphQL
Examples
Named queries
query GetPerson($id: ID!) {person(id: $id) {nameage}}
Mutations
mutation {addPerson(input: { name: "Alice", age: 30 }) {idnameage}}
Interfaces
interface Animal {name: String!makeSound: String!}type Dog implements Animal {name: String!makeSound: String!breed: String!
Types
input PersonInput {name: String!age: Int!}type Mutation {addPerson(input: PersonInput!): Person!}
Enums
enum UserRole {ADMINUSERGUEST}type User {role: UserRole!username: String!