Skip to content

Commit

Permalink
Version Packages (alpha) (#3714)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
acao and github-actions[bot] authored Aug 13, 2024
1 parent 3c901c1 commit cb4553d
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
},
"changesets": [
"breezy-chicken-crash",
"few-steaks-clap",
"flat-lies-heal",
"gentle-bugs-mix",
"good-vans-refuse",
Expand All @@ -33,6 +34,7 @@
"poor-ghosts-jump",
"rich-jobs-kick",
"spotty-bulldogs-confess",
"thirty-spoons-call"
"thirty-spoons-call",
"weak-dancers-jog"
]
}
2 changes: 1 addition & 1 deletion examples/graphiql-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@graphiql/plugin-explorer": "^4.0.0-alpha.0",
"@graphiql/toolkit": "^0.9.2",
"@graphiql/react": "^1.0.0-alpha.0",
"graphiql": "^4.0.0-alpha.0",
"graphiql": "^4.0.0-alpha.1",
"graphql": "^16.9.0",
"graphql-ws": "^5.5.5",
"react": "^18.2.0",
Expand Down
82 changes: 82 additions & 0 deletions packages/graphiql/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,87 @@
# Change Log

## 4.0.0-alpha.1

### Major Changes

- [#3713](https://github.com/graphql/graphiql/pull/3713) [`27bbc51`](https://github.com/graphql/graphiql/commit/27bbc51a69504ffa9c6efbb17f112668f38fe52d) Thanks [@dimaMachina](https://github.com/dimaMachina)! - show tabs even there is only 1 tab

- [#3707](https://github.com/graphql/graphiql/pull/3707) [`3c901c1`](https://github.com/graphql/graphiql/commit/3c901c104123750f45bcd64ade5b0ab9706d3146) Thanks [@dimaMachina](https://github.com/dimaMachina)! - Remove `toolbar.additionalContent` and `toolbar.additionalComponent` props in favor of `GraphiQL.Toolbar` render props.

## Migration from `toolbar.additionalContent`

#### Before

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

#### After

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

### Migration from `toolbar.additionalComponent`

#### Before

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

#### After

```jsx
<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:

```jsx
<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>
```

## 4.0.0-alpha.0

### Major Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/graphiql/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graphiql",
"version": "4.0.0-alpha.0",
"version": "4.0.0-alpha.1",
"description": "An graphical interactive in-browser GraphQL IDE.",
"contributors": [
"Hyohyeon Jeong <[email protected]>",
Expand Down

0 comments on commit cb4553d

Please sign in to comment.