Skip to content

Latest commit

 

History

History
77 lines (56 loc) · 1.71 KB

plugins.md

File metadata and controls

77 lines (56 loc) · 1.71 KB

Plugins

Related plugins for mercurius

mercurius-upload

Implementation of graphql-upload for File upload support.

Check https://github.com/mercurius-js/mercurius-upload for detailed usage.

altair-fastify-plugin

Altair plugin. Fully featured GraphQL Client IDE, good alternative of graphiql and graphql-playground.

npm install altair-fastify-plugin
const AltairFastify = require('altair-fastify-plugin')
// ...
const app = Fastify()

app.register(mercurius, {
  // ...
  graphiql: false,
  ide: false,
  path: '/graphql'
})
// ...
app.register(AltairFastify, {
  path: '/altair',
  baseURL: '/altair/',
  // 'endpointURL' should be the same as the mercurius 'path'
  endpointURL: '/graphql'
})

app.listen(3000)

And it will be available at http://localhost:3000/altair 🎉

Check here for more information.

mercurius-apollo-registry

A Mercurius plugin for schema reporting to Apollo Studio.

Check https://github.com/nearform/mercurius-apollo-registry for usage and readme.

npm install mercurius-apollo-registry
const app = Fastify()
const mercurius = require('mercurius')
const mercuriusApolloRegistry = require('mercurius-apollo-registry')

const schema = `define schema here`
const resolvers = { 
  // ... 
}

app.register(mercurius, {
  schema,
  resolvers,
  graphiql: true
})

app.register(mercuriusApolloRegistry, {
  schema,
  apiKey: 'REPLACE-THIS-VALUE-WITH-APOLLO-API-KEY'
})

app.listen(3000)