From How To Use GraphQL with Ruby on Rails - Part 1 - Backend and How To Use GraphQL with Ruby on Rails - Part 2 - React Apollo Frontend by Andy Leverenz
{
users {
name,
email,
username,
postsCount
}
}
{
user(id: 1) {
id
name
email
username
postsCount
}
}
mutation {
createUser(input: {
name: "User",
email: "user@user.com",
username: "user"
}) {
user {
id,
name,
email,
username
}
errors
}
}