4.0.1 • Published 6 years ago

fastify-graphql v4.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

fastify-graphql

Travis npm Conventional Commits

A plugin for Fastify that adds GraphQL and GraphiQL support.

This project was forked from fastify-apollo as it is no longer being maintained fast enough to keep pace with the rapid changes happening in the GraphQL ecosystem.

Installation

npm install --save fastify-graphql graphql

or

yarn add fastify-graphql graphql

Usage

const Fastify = require('fastify');
const app = Fastify();

const {graphiqlFastify, graphqlFastify} = require('fastify-graphql');
app.register(graphqlFastify, { 
  prefix: '/graphql', 
  graphql: {
    schema: your_graphql_schema,
  },
});
app.register(graphiqlFastify, {
  prefix: '/graphiql',
  graphiql: {
    endpointURL: '/graphql',
  }
});

Configuration

Both plugins need to be given a prefix, under which they will mount.

GraphQL settings extends GraphQLServerOptions

GraphiQL settings extends GraphiQLData

4.0.1

6 years ago

4.0.0

6 years ago

3.1.11

6 years ago

3.1.10

6 years ago

3.1.9

6 years ago

3.1.7

6 years ago

3.1.6

6 years ago

3.1.5

6 years ago

3.1.4

6 years ago

3.1.1

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago