Skip to content

Instantly share code, notes, and snippets.

@apostopher
Last active November 14, 2018 14:32
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 apostopher/84573d2589c6167e56915eea9b609fa5 to your computer and use it in GitHub Desktop.
Save apostopher/84573d2589c6167e56915eea9b609fa5 to your computer and use it in GitHub Desktop.
GraphQL schema
directive @isAuthenticated(strict: Boolean) on FIELD_DEFINITION
type Post {
title: String!
body: String!
}
type Query {
getPosts: [Post]
}
type Mutation {
"Create a new blog post"
createPost(
title: String!
body: String!
): Post @isAuthenticated(strict: true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment