Created
June 14, 2020 17:53
-
-
Save bmonkman/0583a0ae334a830968aa51a5b5a24b5f to your computer and use it in GitHub Desktop.
schemal.graphql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""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