Skip to content

Latest commit

 

History

History
371 lines (225 loc) · 18.6 KB

File metadata and controls

371 lines (225 loc) · 18.6 KB

@graphiql/plugin-explorer

1.0.4

Patch Changes

  • Updated dependencies []:
    • @graphiql/react@0.20.4

1.0.3

Patch Changes

  • #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

1.0.2

Patch Changes

  • Updated dependencies [e89c432d]:
    • @graphiql/react@0.20.2

1.0.1

Patch Changes

  • Updated dependencies [39bf31d1]:
    • @graphiql/react@0.20.1

1.0.0

Patch Changes

  • Updated dependencies [f6afd22d]:
    • @graphiql/react@0.20.0

0.3.5

Patch Changes

  • Updated dependencies []:
    • @graphiql/react@0.19.4

0.3.4

Patch Changes

  • Updated dependencies [2348641c]:
    • @graphiql/react@0.19.3

0.3.3

Patch Changes

  • Updated dependencies [d67c13f6]:
    • @graphiql/react@0.19.2

0.3.2

Patch Changes

0.3.1

Patch Changes

0.3.0

Minor Changes

  • #3330 bed5fc86 Thanks @acao! - BREAKING CHANGE: fix lifecycle issue in plugin-explorer, change implementation pattern

    value and setValue 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} />;
    };

0.2.0

Minor Changes

Patch Changes

  • #3319 2f51b1a5 Thanks @LekoArts! - Use named Explorer import from graphiql-explorer to fix an issue where the bundler didn't correctly choose either the default or Explorer import. This change should ensure that @graphiql/plugin-explorer works correctly without graphiql-explorer being bundled.

0.1.22

Patch Changes

  • #3292 f86e4172 Thanks @B2o5T! - fix umd build names graphiql-plugin-code-exporter.umd.js and graphiql-plugin-explorer.umd.js

0.1.21

Patch Changes

0.1.21-alpha.1

Patch Changes

0.1.21-alpha.0

Patch Changes

0.1.20

Patch Changes

0.1.19

Patch Changes

0.1.18

Patch Changes

  • Updated dependencies [707f3cbc]:
    • @graphiql/react@0.17.4

0.1.17

Patch Changes

  • Updated dependencies []:
    • @graphiql/react@0.17.3

0.1.16

Patch Changes

0.1.15

Patch Changes

0.1.14

Patch Changes

0.1.13

Patch Changes

0.1.12

Patch Changes

0.1.11

Patch Changes

0.1.10

Patch Changes

  • Updated dependencies []:
    • @graphiql/react@0.13.7

0.1.9

Patch Changes

  • Updated dependencies []:
    • @graphiql/react@0.13.6

0.1.8

Patch Changes

  • Updated dependencies [682ad06e]:
    • @graphiql/react@0.13.5

0.1.7

Patch Changes

  • Updated dependencies [4e2f7ff9]:
    • @graphiql/react@0.13.4

0.1.6

Patch Changes

0.1.5

Patch Changes

  • Updated dependencies [39b4668d]:
    • @graphiql/react@0.13.2

0.1.4

Patch Changes

  • Updated dependencies []:
    • @graphiql/react@0.13.1

0.1.3

Patch Changes

0.1.2

Patch Changes

  • #2750 cdc44aab Thanks @thomasheyenbrock! - Remove type field from package.json to support both ES Modules and CommonJS

  • Updated dependencies []:

    • @graphiql/react@0.12.1

0.1.1

Patch Changes

  • #2745 92a17490 Thanks @acao! - Specify MIT license for @graphiql/plugin-explorer package.json

0.1.0

Minor Changes