Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages (alpha) #3714

Merged
merged 1 commit into from
Aug 13, 2024
Merged

Conversation

acao
Copy link
Member

@acao acao commented Aug 13, 2024

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to graphiql-v4, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

graphiql-v4 is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on graphiql-v4.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

graphiql@4.0.0-alpha.1

Major Changes

  • #3713 27bbc51 Thanks @dimaMachina! - show tabs even there is only 1 tab

  • #3707 3c901c1 Thanks @dimaMachina! - Remove toolbar.additionalContent and toolbar.additionalComponent props in favor of GraphiQL.Toolbar render props.

    Migration from toolbar.additionalContent

    Before

    <GraphiQL toolbar={{ additionalContent: <button>My button</button> }} />

    After

    <GraphiQL>
      <GraphiQL.Toolbar>
        {({ merge, prettify, copy }) => (
          <>
            {prettify}
            {merge}
            {copy}
            <button>My button</button>
          </>
        )}
      </GraphiQL.Toolbar>
    </GraphiQL>

    Migration from toolbar.additionalComponent

    Before

    <GraphiQL
      toolbar={{
        additionalComponent: function MyComponentWithAccessToContext() {
          return <button>My button</button>;
        },
      }}
    />

    After

    <GraphiQL>
      <GraphiQL.Toolbar>
        {({ merge, prettify, copy }) => (
          <>
            {prettify}
            {merge}
            {copy}
            <MyComponentWithAccessToContext />
          </>
        )}
      </GraphiQL.Toolbar>
    </GraphiQL>

    Additionally, you can sort default toolbar buttons in different order or remove unneeded buttons for you:

    <GraphiQL>
      <GraphiQL.Toolbar>
        {({ prettify, copy }) => (
          <>
            {copy /* Copy button will be first instead of default last */}
            {/* Merge button is removed from toolbar */}
            {prettify}
          </>
        )}
      </GraphiQL.Toolbar>
    </GraphiQL>

@github-actions github-actions bot force-pushed the changeset-release/graphiql-v4 branch from c6cc4d3 to 0775a2a Compare August 13, 2024 16:18
Copy link
Contributor

The latest changes of this PR are not available as canary, since there are no linked changesets for this PR.

@dimaMachina dimaMachina merged commit cb4553d into graphiql-v4 Aug 13, 2024
2 checks passed
@dimaMachina dimaMachina deleted the changeset-release/graphiql-v4 branch August 13, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants