Skip to content

Instantly share code, notes, and snippets.

@arbaouimehdi
Created September 26, 2018 11:32
Show Gist options
  • Save arbaouimehdi/8cde5225c6cead2b8066f78b393f448f to your computer and use it in GitHub Desktop.
Save arbaouimehdi/8cde5225c6cead2b8066f78b393f448f to your computer and use it in GitHub Desktop.
Graphcool types
# The following types define the data model of the example service
# based on which the GraphQL API is generated
type User @model {
id: ID! @isUnique
name: String
dateOfBirth: DateTime
# Uncomment below - you can declare relations between models like this
# posts: [Post!]! @relation(name: "UserPosts")
}
# Uncomment the model below as well
# type Post @model {
# id: ID! @isUnique
# title: String!
#
# # Every relation also required a back-relation (to determine 1:1, 1:n or n:m)
# author: User! @relation(name: "UserPosts")
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment