mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
18 lines
608 B
TypeScript
18 lines
608 B
TypeScript
/**
|
|
* Rather than use CDNs to include GraphiQL dependencies, import and bundle the dependencies so
|
|
* they can be locally served.
|
|
*/
|
|
|
|
import * as React from 'react';
|
|
import * as ReactDOM from 'react-dom';
|
|
import 'graphql';
|
|
import GraphiQL from 'graphiql';
|
|
import SubscriptionsTransportWs from 'subscriptions-transport-ws';
|
|
|
|
window.React = React;
|
|
window.ReactDOM = ReactDOM;
|
|
// @ts-expect-error Assigning to window is required for graphene-django
|
|
window.SubscriptionsTransportWs = SubscriptionsTransportWs;
|
|
// @ts-expect-error Assigning to window is required for graphene-django
|
|
window.GraphiQL = GraphiQL;
|