Skip to content

Instantly share code, notes, and snippets.

@ZucchiniZe
Last active December 5, 2016 05:48
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 ZucchiniZe/1fdd9e9e1b11023415ed18ab8e1680a7 to your computer and use it in GitHub Desktop.
Save ZucchiniZe/1fdd9e9e1b11023415ed18ab8e1680a7 to your computer and use it in GitHub Desktop.
scalar Date
scalar File
scalar EncryptedString
interface Node {
id: ID!
}
interface Timestamped {
createdAt: Date!
updatedAt: Date!
}
input EntryInput {
title: String!
summary: String!
tags: [String!]!
body: String!
location: Location!
images: [File]
}
input UserInput {
username: String!
email: String!
password: String!
}
type Location implements Node {
id: ID!
hasLocation: Boolean!
lat: Float
lng: Float
}
type Entry implements Node, Timestamped {
id: ID!
createdAt: Date!
updatedAt: Date!
title: String!
summary: String!
body: String!
location: Location!
tags: [String!]!
images: [File]
author: User!
}
type User implements Node {
id: ID!
email: String!
password: EncryptedString!
username: String!
}
type Root {
allEntries: [Entry]!
allUsers: [User]!
user(id: ID!): User!
entry(id: ID!): Entry!
}
type Mutation {
createEntry(entry: EntryInput!): Entry!
createUser(user: UserInput!): User!
}
schema {
query: Root
mutation: Mutation
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment