Skip to content

Instantly share code, notes, and snippets.

@tmeasday
Last active March 20, 2017 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmeasday/52cc7f8cebbd4e409bb10702669fb4be to your computer and use it in GitHub Desktop.
Save tmeasday/52cc7f8cebbd4e409bb10702669fb4be to your computer and use it in GitHub Desktop.
# This is the input file, which lives at input/Task.graphql,
# although you can throw it away when you have run the codegen.
type Task {
title: String!
# This field references another type (which we will create soon)
# and CGS will expect our database record to have an `ownerId` field.
owner: User!
# We mark this field as an enum, so CGS knows
# it's not a reference to another type
state: TaskState! @enum
# These two are optional for now
subtitle: String
url: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment