Nancy's Preferred Machete

    mercurius-apollo-registry

    2.0.0 • Public • Published

    Mercurius Apollo Registry Plugin

    A Mercurius plugin for schema reporting to Apollo Studio.

    Installation

    npm install mercurius-apollo-registry
    

    Please note that this plugin requires Mercurius as a dependency.

    Usage

    This plugin can be used to report a given GraphQL schema to the Apollo Studio Registry.

    Set up Apollo Studio

    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.

    Add plugin to your fastify instance

    const mercuriusApolloRegistry = require('mercurius-apollo-registry')
    
    fastify.register(mercuriusApolloRegistry, {
      schema,
      apiKey
    })

    Plugin options

    • 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 to current.
    • registryUrl string (optional) The registry API endpoint to use. Defaults to https://schema-reporting.api.apollographql.com/api/graphql.

    Registry Protocol

    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.

    Contributing

    See CONTRIBUTING.md

    License

    Copyright NearForm Ltd 2021. Licensed under the Apache-2.0 license.

    Install

    npm i mercurius-apollo-registry

    DownloadsWeekly Downloads

    7

    Version

    2.0.0

    License

    Apache-2.0

    Unpacked Size

    27.2 kB

    Total Files

    15

    Last publish

    Collaborators

    • simoneb
    • nigelhanlon
    • matteo.collina