File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' graphiql ' : patch
3+ ---
4+
5+ Export hooks in CDN bundle
Original file line number Diff line number Diff line change @@ -14,9 +14,22 @@ import '@graphiql/react/dist/style.css';
1414import './style.css' ;
1515
1616import { GraphiQL } from './components/GraphiQL' ;
17+
18+ import {
19+ useEditorContext ,
20+ useExecutionContext ,
21+ useSchemaContext ,
22+ } from '@graphiql/react' ;
23+
1724// add the static function here for CDN only. otherwise, doing this in the component could
1825// add unwanted dependencies to the bundle.
1926// @ts -expect-error
2027GraphiQL . createFetcher = createGraphiQLFetcher ;
28+ // @ts -expect-error
29+ GraphiQL . useEditorContext = useEditorContext ;
30+ // @ts -expect-error
31+ GraphiQL . useExecutionContext = useExecutionContext ;
32+ // @ts -expect-error
33+ GraphiQL . useSchemaContext = useSchemaContext ;
2134
2235export default GraphiQL ;
You can’t perform that action at this time.
0 commit comments