@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);
exporter.apiResponse({
body: {
data: {
hello: "world",
},
},
givenUUID,
statusCode: 200,
});
License
MIT - https://graphqlvisualizer.com/