Skip to content

Instantly share code, notes, and snippets.

@maticzav
Created January 3, 2018 17:01
Show Gist options
  • Save maticzav/79043413dcf320f7f2993e5b54fd8e05 to your computer and use it in GitHub Desktop.
Save maticzav/79043413dcf320f7f2993e5b54fd8e05 to your computer and use it in GitHub Desktop.
# src/schema.graphql
# import User, Note from './generated/database.graphql'
type Query {
me: User,
note(id: ID!): Note
}
type Mutation {
createNote(text: String!): Note!
updateNote(id: ID!, text: String!): Note
deleteNote(id: ID!): Note
authenticate(githubCode: String!): AuthenticateUserPayload
}
type AuthenticateUserPayload {
user: User!
token: String!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment