Skip to content

Instantly share code, notes, and snippets.

@sorenbs
Created May 13, 2018 16:08
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 sorenbs/366cc135c958b412c4eae12b23d18112 to your computer and use it in GitHub Desktop.
Save sorenbs/366cc135c958b412c4eae12b23d18112 to your computer and use it in GitHub Desktop.
Data model for the examples on prisma.io/features/graphql-api
type User {
id: ID! @unique
name: String!
email: String! @unique
isAdmin: Boolean @default(value: "false")
posts: [Post!]!
}
type Post {
id: ID! @unique
createdAt: DateTime!
updatedAt: DateTime!
title: String!
author: User!
}
@harrycha
Copy link

Putting in a response would also be a good idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment