graphql-vision-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.4.4 • Public • Published

graphql-vision-plugin

npm Node CI

You can use this plugin in your apollo server in order to send tracing results to a graphql-vision server.

Getting started

Use npm to install the library:

npm i --save graphql-vision-plugin

Add it to your apollo server configurations:

import GraphQLVisionPlugin from 'graphql-vision-plugin';
import {keepAliveInterval} from 'graphql-vision-plugin';
 
const server = new ApolloServer({
    typeDefs, resolvers, tracing: true, plugins: [new GraphQLVisionPlugin('http://localhost:4000/graphql',
    'my-app', 4000)]
});
 
keepAliveInterval(); // it will send a frequent keep alive to the vision server, and will be presented in the dashboard

The tracing argument must be set to true. The GraphQLVisionPlugin receives the address to a graphql-vision server that will monitor the requests to our server, and our application id (sender-id). It also receives an interval in milliseconds for a keep-alive, so it knows when your service works.

You should send your graphql-vision server (graphql) endpoint to the constructor of the plugin.

/graphql-vision-plugin/

    Package Sidebar

    Install

    npm i graphql-vision-plugin

    Weekly Downloads

    1

    Version

    0.4.4

    License

    ISC

    Unpacked Size

    8.08 kB

    Total Files

    9

    Last publish

    Collaborators

    • yarinvak