Skip to content

Instantly share code, notes, and snippets.

@tmeasday
Last active August 30, 2019 22:24
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save tmeasday/114550631af15743f79ec7f0b9345197 to your computer and use it in GitHub Desktop.
Save tmeasday/114550631af15743f79ec7f0b9345197 to your computer and use it in GitHub Desktop.
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
}
@rootedsoftware
Copy link

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