UNPKG

apollo-client-devtools

Version:

Developer tools for Apollo Client, with GraphiQL integration, cache inspection, and query watching.

12 lines (10 loc) • 442 B
// This script is injected into every page. import { installHook } from "src/backend/hook"; import { version as devToolsVersion } from "../manifest.json"; // inject the hook if (document instanceof HTMLDocument) { const script = document.createElement("script"); script.textContent = `;(${installHook.toString()})(window, "${devToolsVersion}")`; document.documentElement.appendChild(script); script.parentNode.removeChild(script); }