Skip to content

Commit cb4553d

Browse files
Version Packages (alpha) (#3714)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 3c901c1 commit cb4553d

File tree

4 files changed

+87
-3
lines changed

4 files changed

+87
-3
lines changed

.changeset/pre.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
},
2424
"changesets": [
2525
"breezy-chicken-crash",
26+
"few-steaks-clap",
2627
"flat-lies-heal",
2728
"gentle-bugs-mix",
2829
"good-vans-refuse",
@@ -33,6 +34,7 @@
3334
"poor-ghosts-jump",
3435
"rich-jobs-kick",
3536
"spotty-bulldogs-confess",
36-
"thirty-spoons-call"
37+
"thirty-spoons-call",
38+
"weak-dancers-jog"
3739
]
3840
}

examples/graphiql-webpack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@graphiql/plugin-explorer": "^4.0.0-alpha.0",
1414
"@graphiql/toolkit": "^0.9.2",
1515
"@graphiql/react": "^1.0.0-alpha.0",
16-
"graphiql": "^4.0.0-alpha.0",
16+
"graphiql": "^4.0.0-alpha.1",
1717
"graphql": "^16.9.0",
1818
"graphql-ws": "^5.5.5",
1919
"react": "^18.2.0",

packages/graphiql/CHANGELOG.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,87 @@
11
# Change Log
22

3+
## 4.0.0-alpha.1
4+
5+
### Major Changes
6+
7+
- [#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
8+
9+
- [#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.
10+
11+
## Migration from `toolbar.additionalContent`
12+
13+
#### Before
14+
15+
```jsx
16+
<GraphiQL toolbar={{ additionalContent: <button>My button</button> }} />
17+
```
18+
19+
#### After
20+
21+
```jsx
22+
<GraphiQL>
23+
<GraphiQL.Toolbar>
24+
{({ merge, prettify, copy }) => (
25+
<>
26+
{prettify}
27+
{merge}
28+
{copy}
29+
<button>My button</button>
30+
</>
31+
)}
32+
</GraphiQL.Toolbar>
33+
</GraphiQL>
34+
```
35+
36+
### Migration from `toolbar.additionalComponent`
37+
38+
#### Before
39+
40+
```jsx
41+
<GraphiQL
42+
toolbar={{
43+
additionalComponent: function MyComponentWithAccessToContext() {
44+
return <button>My button</button>;
45+
},
46+
}}
47+
/>
48+
```
49+
50+
#### After
51+
52+
```jsx
53+
<GraphiQL>
54+
<GraphiQL.Toolbar>
55+
{({ merge, prettify, copy }) => (
56+
<>
57+
{prettify}
58+
{merge}
59+
{copy}
60+
<MyComponentWithAccessToContext />
61+
</>
62+
)}
63+
</GraphiQL.Toolbar>
64+
</GraphiQL>
65+
```
66+
67+
***
68+
69+
Additionally, you can sort default toolbar buttons in different order or remove unneeded buttons for you:
70+
71+
```jsx
72+
<GraphiQL>
73+
<GraphiQL.Toolbar>
74+
{({ prettify, copy }) => (
75+
<>
76+
{copy /* Copy button will be first instead of default last */}
77+
{/* Merge button is removed from toolbar */}
78+
{prettify}
79+
</>
80+
)}
81+
</GraphiQL.Toolbar>
82+
</GraphiQL>
83+
```
84+
385
## 4.0.0-alpha.0
486

587
### Major Changes

packages/graphiql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphiql",
3-
"version": "4.0.0-alpha.0",
3+
"version": "4.0.0-alpha.1",
44
"description": "An graphical interactive in-browser GraphQL IDE.",
55
"contributors": [
66
"Hyohyeon Jeong <[email protected]>",

0 commit comments

Comments
 (0)