Last active
August 30, 2019 22:24
-
-
Save tmeasday/114550631af15743f79ec7f0b9345197 to your computer and use it in GitHub Desktop.
This file contains 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
enum TaskState { | |
TASK_INBOX | |
TASK_PINNED | |
TASK_SNOOZED | |
TASK_ARCHIVED | |
} | |
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I see you've added the input to this code snippet, you might also want to add this to your blog post. Thanks