A Mercurius plugin for schema reporting to Apollo Studio.
npm install mercurius-apollo-registry
Please note that this plugin requires Mercurius as a dependency.
This plugin can be used to report a given GraphQL schema to the Apollo Studio Registry.
In order to use this plugin, you should already have an account with Apollo Studio as well as at least one target graph already defined. Each graph has a unique API key associated with it that will be required by this plugin at start up.
You can find more information about Apollo Studio here.
const mercuriusApolloRegistry = require('mercurius-apollo-registry')
fastify.register(mercuriusApolloRegistry, {
schema,
apiKey
})
schema
string
(required) A stringified version of the GraphQL schema used by Mercurius.apiKey
string
(required) API key for the specific graph you wish to reference in Apollo Studio.graphVariant
string
(optional) The GraphQL variant to use in Apollo Studio. Defaults tocurrent
.registryUrl
string
(optional) The registry API endpoint to use. Defaults tohttps://schema-reporting.api.apollographql.com/api/graphql
.
A complete reference for the registry reporting protocol can be found in the Apollo GraphQL Documentation.
This plugin aims to allow integration and operability between Apollo Studio and Mercurius.
See CONTRIBUTING.md
Copyright NearForm Ltd 2021. Licensed under the Apache-2.0 license.