Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
enum TaskState {
type Task {
id: ID!
title: String!
state: TaskState!
# These two are optional for now
subtitle: String
url: String
# We'll use floats for dates for now, we could use a custom scalar
updatedAt: Float!
type User {
id: ID!
email: String!
hasGitHubToken: Boolean!
hasTrelloToken: Boolean!
tasks(state: TaskState): [Task!]!
type Query {
me: User
input CreateUserInput {
email: String!
password: String!
input UpdateTaskInput {
state: TaskState!
type Mutation {
createUser(input: CreateUserInput!): User
addServiceToken(serviceName: String!, token: String!): User
updateTask(id: ID!, input: UpdateTaskInput!): Task
schema {
query: Query
mutation: Mutation

This comment has been minimized.

Copy link

@c316 c316 commented Apr 6, 2017

I see you've added the input to this code snippet, you might also want to add this to your blog post. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment