0.0.0-alpha.10 • Published 2 years ago

@gql-vis/exporter v0.0.0-alpha.10

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

@gql-vis/exporter

You should use the exporter if you want to extend the plugin ecosystem or you want to send custom API calls and responses to your collector.

Installation

npm install @gql-vis/exporter

Usage

import { Exporter } from "@gql-vis/exporter";

const exporter = new Exporter({
  apiKey: `YOUR-API-KEY`,
  url: `https://app.graphqlanalyzer.com/api/v1/collector`,
});

const payload = {
  body: {
    query: `query { hello }`,
    params: {},
  },
  headers: {},
  method: "POST",
  type: "GRAPHQL",
  url: "http://127.0.0.1:5000/graphql",
};

const { givenUUID } = exporter.apiCall(payload);

// Do the network call here

exporter.apiResponse({
  body: {
    data: {
      hello: "world",
    },
  },
  givenUUID,
  statusCode: 200,
});

License

MIT - https://graphqlvisualizer.com/

0.0.0-alpha.10

2 years ago

0.0.0-alpha.9

2 years ago

0.0.0-alpha.8

2 years ago

0.0.0-alpha.7

2 years ago

0.0.0-alpha.6

2 years ago

0.0.0-alpha.5

2 years ago

0.0.0-alpha.4

2 years ago

0.0.0-alpha.3

2 years ago

0.0.0-alpha.2

2 years ago

0.0.0-alpha.1

2 years ago

0.0.0-alpha.0

2 years ago