- Updated dependencies []:
- @graphiql/react@0.20.4
-
#3526
2b6ea316
Thanks @benjie! - Fix bug whereby typing quickly into explorer sidebar would result in characters being dropped. -
Updated dependencies [
2b6ea316
]:- @graphiql/react@0.20.3
- Updated dependencies [
e89c432d
]:- @graphiql/react@0.20.2
- Updated dependencies [
39bf31d1
]:- @graphiql/react@0.20.1
- Updated dependencies [
f6afd22d
]:- @graphiql/react@0.20.0
- Updated dependencies []:
- @graphiql/react@0.19.4
- Updated dependencies [
2348641c
]:- @graphiql/react@0.19.3
- Updated dependencies [
d67c13f6
]:- @graphiql/react@0.19.2
-
#3341
e4a36207
Thanks @acao! - Fix code exporter plugin on early init, add hooks -
Updated dependencies [
17069e7a
,e4a36207
]:- @graphiql/react@0.19.1
-
#3330
bed5fc86
Thanks @acao! - BREAKING CHANGE: fix lifecycle issue in plugin-explorer, change implementation patternvalue
andsetValue
is no longer an implementation detail, and are handled internally by plugins. the plugin signature has changed slightly as well.now, instead of something like this:
import { useExplorerPlugin } from '@graphiql/plugin-explorer'; import { snippets } from './snippets'; import { useExporterPlugin } from '@graphiql/plugin-code-exporter'; const App = () => { const [query, setQuery] = React.useState(''); const explorerPlugin = useExplorerPlugin({ query, onEdit: setQuery, }); const codeExporterPlugin = useExporterPlugin({ query, snippets, }); const plugins = React.useMemo( () => [explorerPlugin, codeExporterPlugin], [explorerPlugin, codeExporterPlugin], ); return ( <GraphiQL query={query} onEditQuery={setQuery} plugins={plugins} fetcher={fetcher} /> ); };
you can just do this:
import { explorerPlugin } from '@graphiql/plugin-explorer'; import { snippets } from './snippets'; import { codeExporterPlugin } from '@graphiql/plugin-code-exporter'; import { createGraphiQLFetcher } from '@graphiql/toolkit'; // only invoke these inside the component lifecycle // if there are dynamic values, and then use useMemo() (see below) const explorer = explorerPlugin(); const exporter = codeExporterPlugin({ snippets }); const fetcher = createGraphiQLFetcher({ url: '/graphql' }); const App = () => { return <GraphiQL plugins={[explorer, exporter]} fetcher={fetcher} />; };
or this, for more complex state-driven needs:
import { useMemo } from 'react'; import { explorerPlugin } from '@graphiql/plugin-explorer'; import { snippets } from './snippets'; import { codeExporterPlugin } from '@graphiql/plugin-code-exporter'; const explorer = explorerPlugin(); const fetcher = createGraphiQLFetcher({ url: '/graphql' }); const App = () => { const { snippets } = useMyUserSuppliedState(); const exporter = useMemo( () => codeExporterPlugin({ snippets }), [snippets], ); return <GraphiQL plugins={[explorer, exporter]} fetcher={fetcher} />; };
- #3319
2f51b1a5
Thanks @LekoArts! - Use namedExplorer
import fromgraphiql-explorer
to fix an issue where the bundler didn't correctly choose either thedefault
orExplorer
import. This change should ensure that@graphiql/plugin-explorer
works correctly withoutgraphiql-explorer
being bundled.
- #3292
f86e4172
Thanks @B2o5T! - fix umd build namesgraphiql-plugin-code-exporter.umd.js
andgraphiql-plugin-explorer.umd.js
-
#3229
0a65e720
Thanks @B2o5T! - exclude peer dependencies and dependencies from bundle -
#3251
f8d8509b
Thanks @B2o5T! - always bundlepackage.json#dependencies
for UMD build for@graphiql/plugin-code-exporter
and@graphiql/plugin-explorer
-
#3252
c915a4ee
Thanks @B2o5T! -@graphiql/react
should be inpeerDependencies
not independencies
-
Updated dependencies [
9ac84bfc
,9ac84bfc
,9ac84bfc
,9ac84bfc
,bc9d243d
,9ac84bfc
,9ac84bfc
,9ac84bfc
,67bf93a3
]:- @graphiql/react@0.18.0
-
#3229
0a65e720
Thanks @B2o5T! - exclude peer dependencies and dependencies from bundle -
Updated dependencies [
bc9d243d
,67bf93a3
]:- @graphiql/react@0.18.0-alpha.1
- Updated dependencies [
9ac84bfc
,9ac84bfc
,9ac84bfc
,9ac84bfc
,9ac84bfc
,9ac84bfc
,9ac84bfc
]:- @graphiql/react@0.18.0-alpha.0
-
#3124
c645932c
Thanks @B2o5T! - avoid unecessary renders by using useMemo or useCallback -
Updated dependencies [
911cf3e0
,c645932c
,2ca4841b
,7bf90929
,431b7fe1
]:- @graphiql/react@0.17.6
- Updated dependencies [
707f3cbc
]:- @graphiql/react@0.17.4
- Updated dependencies []:
- @graphiql/react@0.17.3
-
#3017
4a2284f5
Thanks @thomasheyenbrock! - Avoid bundling code fromreact/jsx-runtime
so that the package can be used with Preact -
#3063
5792aaa5
Thanks @B2o5T! - avoiduseMemo
with empty array[]
since React can't guarantee stable reference, + lint restrict syntax for future mistakes -
Updated dependencies [
2d5c60ec
,b9c13328
,4a2284f5
,881a2024
,7cf4908a
]:- @graphiql/react@0.17.1
- Updated dependencies [
f7addb20
,cec3fb2a
,11e6ad11
,c70d9165
,d502a33b
,0669767e
,f263f778
,ccba2f33
,4ff2794c
]:- @graphiql/react@0.16.0
- Updated dependencies [
16174a05
,f6cae4ea
,3340fd74
,0851d5f9
,83364b28
,3a7d0007
]:- @graphiql/react@0.15.0
- Updated dependencies []:
- @graphiql/react@0.13.7
- Updated dependencies []:
- @graphiql/react@0.13.6
- Updated dependencies [
682ad06e
]:- @graphiql/react@0.13.5
- Updated dependencies [
4e2f7ff9
]:- @graphiql/react@0.13.4
- Updated dependencies [
39b4668d
]:- @graphiql/react@0.13.2
- Updated dependencies []:
- @graphiql/react@0.13.1
- #2735
ca067d88
Thanks @thomasheyenbrock! - Use the new CSS variables for color alpha values defined in@graphiql/react
in style definitions
-
#2757
32a70065
Thanks @thomasheyenbrock! - Use different colors for field names and argument names -
Updated dependencies [
ca067d88
,32a70065
]:- @graphiql/react@0.13.0
-
#2750
cdc44aab
Thanks @thomasheyenbrock! - Removetype
field frompackage.json
to support both ES Modules and CommonJS -
Updated dependencies []:
- @graphiql/react@0.12.1
- #2738
33bef178
Thanks @thomasheyenbrock! - Fix peer dependency versions
-
#2747
52d0003f
Thanks @thomasheyenbrock! - Make@graphiql/react
a real dependency instead of a peer dependency -
Updated dependencies [
98e14155
,7dfea94a
,3aa1f39f
,0219eef3
]:- @graphiql/react@0.12.0
- #2724
dd5db3b2
Thanks @thomasheyenbrock! - Add a package that exports a plugin to use the GraphiQL Explorer from OneGraph