Skip to content

Instantly share code, notes, and snippets.

@stubailo
Last active September 19, 2023 18:03
Show Gist options
  • Save stubailo/853e16e7d538637d5b6cb14da0cbd892 to your computer and use it in GitHub Desktop.
Save stubailo/853e16e7d538637d5b6cb14da0cbd892 to your computer and use it in GitHub Desktop.
const fetch = require("node-fetch");
const { introspectionQuery } = require("graphql");
const fs = require("fs");
fetch("https://1jzxrj179.lp.gql.zone/graphql", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ query: introspectionQuery })
})
.then(res => res.json())
.then(res =>
fs.writeFileSync("result.json", JSON.stringify(res.data, null, 2))
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment