Skip to content

Instantly share code, notes, and snippets.

@vitorpiovezam
Created March 6, 2019 02:28
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 vitorpiovezam/723ce7cf50c3306c4ad6d2ef63f22aa0 to your computer and use it in GitHub Desktop.
Save vitorpiovezam/723ce7cf50c3306c4ad6d2ef63f22aa0 to your computer and use it in GitHub Desktop.
# 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