Skip to content

Instantly share code, notes, and snippets.

@mhaagens
Created July 1, 2018 11:39
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 mhaagens/9f3c66ff98cdd0e97f777638195362f5 to your computer and use it in GitHub Desktop.
Save mhaagens/9f3c66ff98cdd0e97f777638195362f5 to your computer and use it in GitHub Desktop.
Authentication and authorization using GraphQL Schema Directives: src/app.js snippet
const server = new ApolloServer({
typeDefs,
resolvers,
schemaDirectives: {
requireAuth: requireAuthDirective
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment