0.0.0-alpha.10 • Published 1 year ago

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

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year 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

1 year ago

0.0.0-alpha.9

1 year ago

0.0.0-alpha.8

1 year ago

0.0.0-alpha.7

1 year ago

0.0.0-alpha.6

1 year ago

0.0.0-alpha.5

1 year ago

0.0.0-alpha.4

1 year ago

0.0.0-alpha.3

1 year ago

0.0.0-alpha.2

1 year ago

0.0.0-alpha.1

1 year ago

0.0.0-alpha.0

1 year ago