diff --git a/.changeset/pre.json b/.changeset/pre.json index dac7dd49cab..39947939197 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -23,6 +23,7 @@ }, "changesets": [ "breezy-chicken-crash", + "few-steaks-clap", "flat-lies-heal", "gentle-bugs-mix", "good-vans-refuse", @@ -33,6 +34,7 @@ "poor-ghosts-jump", "rich-jobs-kick", "spotty-bulldogs-confess", - "thirty-spoons-call" + "thirty-spoons-call", + "weak-dancers-jog" ] } diff --git a/examples/graphiql-webpack/package.json b/examples/graphiql-webpack/package.json index 19693eec98e..60be22a4b25 100644 --- a/examples/graphiql-webpack/package.json +++ b/examples/graphiql-webpack/package.json @@ -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", diff --git a/packages/graphiql/CHANGELOG.md b/packages/graphiql/CHANGELOG.md index aa6f16eacfe..24689761f0f 100644 --- a/packages/graphiql/CHANGELOG.md +++ b/packages/graphiql/CHANGELOG.md @@ -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 + My button }} /> + ``` + + #### After + + ```jsx + + + {({ merge, prettify, copy }) => ( + <> + {prettify} + {merge} + {copy} + + + )} + + + ``` + + ### Migration from `toolbar.additionalComponent` + + #### Before + + ```jsx + My button; + }, + }} + /> + ``` + + #### After + + ```jsx + + + {({ merge, prettify, copy }) => ( + <> + {prettify} + {merge} + {copy} + + + )} + + + ``` + + *** + + Additionally, you can sort default toolbar buttons in different order or remove unneeded buttons for you: + + ```jsx + + + {({ prettify, copy }) => ( + <> + {copy /* Copy button will be first instead of default last */} + {/* Merge button is removed from toolbar */} + {prettify} + + )} + + + ``` + ## 4.0.0-alpha.0 ### Major Changes diff --git a/packages/graphiql/package.json b/packages/graphiql/package.json index 8f87073b4e1..c8e1a469e09 100644 --- a/packages/graphiql/package.json +++ b/packages/graphiql/package.json @@ -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 ",