graphiql

GraphiQL & the GraphQL LSP Reference Ecosystem for building browser & IDE tools.

MIT License

Downloads
8.4M
Stars
15.7K
Committers
292

Bot releases are visible (Hide)

graphiql - @graphiql/[email protected]

Published by acao over 1 year ago

Patch Changes

graphiql - @graphiql/[email protected]

Published by acao over 1 year ago

Minor Changes

  • #3130 9a38de29 Thanks @lesleydreyer! - - Add a "clear history" button to clear all history as well as trash icons to clear individual history items

    • Change so item is in history items or history favorites, not both
    • Fix history label editing so if the same item is in the list more than once it edits the correct label
    • Pass the entire history item in history functions (addToHistory, editLabel, toggleFavorite, etc.) so users building their own HistoryContext.Provider will get any additional props they added to the item in their customized functions
    • Adds a "setActive" callback users can use to customize their UI when the history item is clicked
graphiql - [email protected]

Published by acao over 1 year ago

Patch Changes

graphiql - [email protected]

Published by acao over 1 year ago

Minor Changes

  • #3285 d7f595e3 Thanks @B2o5T! - avoid bundling unnecessary languages โ€” import monaco-graphql/esm/monaco-editor instead of monaco-editor to reduce your bundle size, as that imports only graphql and json languages and leaves out ts, css, html, and much more
graphiql - [email protected]

Published by acao over 1 year ago

Patch Changes

  • #3322 6939bac4 Thanks @acao! - Bypass babel typescript parsing errors to continue extracting graphql strings
graphiql - [email protected]

Published by acao over 1 year ago

Patch Changes

graphiql - @graphiql/[email protected]

Published by acao over 1 year ago

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} />;
    };
    
graphiql - @graphiql/[email protected]

Published by acao over 1 year ago

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} />;
    };
    
graphiql - @graphiql/[email protected]

Published by acao over 1 year ago

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.
graphiql - @graphiql/[email protected]

Published by acao over 1 year ago

Minor Changes

graphiql - @graphiql/[email protected]

Published by acao over 1 year ago

Patch Changes

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

Published by acao over 1 year ago

Patch Changes

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

Published by acao over 1 year ago

Patch Changes

graphiql - [email protected]

Published by acao over 1 year ago

Patch Changes

graphiql - [email protected]

Published by acao over 1 year ago

Patch Changes

graphiql - @graphiql/[email protected]

Published by acao over 1 year ago

Minor Changes

  • #3181 9ac84bfc Thanks @B2o5T! - remove initialTabs, use defaultTabs instead

  • #3181 9ac84bfc Thanks @B2o5T! - replace @reach/dialog by @radix-ui/react-dialog replace @reach/visually-hidden by @radix-ui/react-visually-hidden

  • #3181 9ac84bfc Thanks @B2o5T! - replace @reach/menu-button by @radix-ui/react-dropdown-menu remove @reach/listbox remove <ToolbarListbox /> and <Listbox /> components (use <Menu /> instead)

  • #3181 9ac84bfc Thanks @B2o5T! - fixed long list items in dropdown were hidden

    rename <Menu /> to <DropdownMenu /> rename <Menu.List /> to <DropdownMenu.Content /> rename <Menu.Item /> to <DropdownMenu.Item /> rename <Menu.Button /> to <DropdownMenu.Button />

  • #3181 9ac84bfc Thanks @B2o5T! - replace @reach/tooltip by @radix-ui/react-tooltip

  • #3181 9ac84bfc Thanks @B2o5T! - replace @reach/combobox with Combobox from @headlessui/react

  • #3181 9ac84bfc Thanks @B2o5T! - tabs could be reorderded

Patch Changes

graphiql - [email protected]

Published by acao over 1 year ago

Patch Changes

graphiql - @graphiql/[email protected]

Published by acao over 1 year ago

Patch Changes

graphiql - [email protected]

Published by acao over 1 year ago

Major Changes

Patch Changes

graphiql - @graphiql/[email protected]

Published by acao over 1 year ago

Patch Changes

Package Rankings
Top 0.51% on Npmjs.org
Top 10.49% on Clojars.org
Top 6.84% on Repo1.maven.org
Top 10.91% on Bower.io
Top 3.56% on Proxy.golang.org
Badges
Extracted from project README
Build Status Discord Code Coverage Snyk Vulnerabilities for GitHub Repo CII Best Practices NPM NPM NPM NPM NPM NPM NPM Discord
Related Projects