Skip to content

Instantly share code, notes, and snippets.

@bmonkman
Created June 14, 2020 17:53
Show Gist options
  • Save bmonkman/0583a0ae334a830968aa51a5b5a24b5f to your computer and use it in GitHub Desktop.
Save bmonkman/0583a0ae334a830968aa51a5b5a24b5f to your computer and use it in GitHub Desktop.
schemal.graphql
"""A date following the RFC3339 standard"""
scalar RFC3339Date
"""A date without time information"""
scalar Date
"""Cursor-based pagination helper"""
type PageInfo {
startCursor: String
endCursor: String
hasPreviousPage: Boolean!
hasNextPage: Boolean!
totalCount: Int!
}
type User {
id: ID!
firstName: String!
lastName: String!
email: String!
}
input UserInput {
firstName: String!
lastName: String!
email: String!
}
# All objects available to read
type Query {
user(id: ID!): User
}
# All objects available to write
type Mutation {
createUser(user: UserInput): User!
updateUser(id: ID!, user: UserInput): User!
deleteUser(id: ID!): Boolean!
}
schema {
query: Query
mutation: Mutation
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment