@gql-vis/exporter
v0.0.0-alpha.10
Published
- This is the official [GraphQL Analyzer](https://graphqlanalyzer.com/) exporter.
Downloads
21
Readme
@gql-vis/exporter
- This is the official GraphQL Analyzer 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/exporterUsage
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/
