Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 main, this PR will be updated.
Releases
[email protected]
Major Changes
d1805200
Thanks @thomasheyenbrock! - BREAKING: Change the implementation of the info popup when hovering items in the code editor:MyType.myField
->myField
MyType.myField(myArg: MyArgType)
->myArg: MyArgType
[email protected]
Major Changes
#2523
fdcd9054
Thanks @thomasheyenbrock! - BREAKING: TheGraphiQL
component does no longer set a propertyg
on thewindow
object.#2523
d1805200
Thanks @thomasheyenbrock! - BREAKING: Implement a new design for the GraphiQL UI. This changes both DOM structure and class names. We consider this a breaking change as custom GraphQL IDEs built on top of GraphiQL relied on these internals, e.g. overriding styles using certain class names.#2523
9fc6b476
Thanks @thomasheyenbrock! - BREAKING: The following static properties of theGraphiQL
component have been removed:GraphiQL.formatResult
: You can use the functionformatResult
from@graphiql/toolkit
instead.GraphiQL.formatError
: You can use the functionformatError
from@graphiql/toolkit
instead.GraphiQL.QueryEditor
: You can use theQueryEditor
component from@graphiql/react
instead.GraphiQL.VariableEditor
: You can use theVariableEditor
component from@graphiql/react
instead.GraphiQL.HeaderEditor
: You can use theHeaderEditor
component from@graphiql/react
instead.GraphiQL.ResultViewer
: You can use theResponseEditor
component from@graphiql/react
instead.GraphiQL.Button
: You can use theToolbarButton
component from@graphiql/react
instead.GraphiQL.ToolbarButton
: This exposed the same component asGraphiQL.Button
.GraphiQL.Menu
: You can use theToolbarMenu
component from@graphiql/react
instead.GraphiQL.MenuItem
: You can use theToolbarMenu.Item
component from@graphiql/react
instead.GraphiQL.Group
: Grouping multiple buttons side-by-side is not provided out-of-the box anymore in the new GraphiQL UI. If you want to implement a similar feature in the new vertical toolbar you can do so by adding your own styles for your custom toolbar elements. Example:#2523
864dfb03
Thanks @thomasheyenbrock! - BREAKING: The following exports of thegraphiql
package have been removed:DocExplorer
: Now exported from@graphiql/react
asDocExplorer
schema
prop has been removed, the component now uses the schema provided by theExplorerContext
fillLeafs
: Now exported from@graphiql/toolkit
asfillLeafs
getSelectedOperationName
: Now exported from@graphiql/toolkit
asgetSelectedOperationName
mergeAst
: Now exported from@graphiql/toolkit
asmergeAst
onHasCompletion
: Now exported from@graphiql/react
asonHasCompletion
QueryEditor
: Now exported from@graphiql/react
asQueryEditor
ToolbarMenu
: Now exported from@graphiql/react
asToolbarMenu
ToolbarMenuItem
: Now exported from@graphiql/react
asToolbarMenu.Item
ToolbarSelect
: Now exported from@graphiql/react
asToolbarListbox
ToolbarSelectOption
: Now exported from@graphiql/react
asToolbarListbox.Option
VariableEditor
: Now exported from@graphiql/react
asVariableEditor
Fetcher
: Now exported from@graphiql/toolkit
FetcherOpts
: Now exported from@graphiql/toolkit
FetcherParams
: Now exported from@graphiql/toolkit
FetcherResult
: Now exported from@graphiql/toolkit
FetcherReturnType
: Now exported from@graphiql/toolkit
Observable
: Now exported from@graphiql/toolkit
Storage
: Now exported from@graphiql/toolkit
SyncFetcherResult
: Now exported from@graphiql/toolkit
#2523
2c860e10
Thanks @thomasheyenbrock! - BREAKING: TheGraphiQL
component has been refactored to be a function component. Attaching a ref to this component will no longer provide access to props, state or class methods. In order to interact with or changeGraphiQL
state you need to use the contexts and hooks provided by the@graphiql/react
package. More details and examples can be found in the migration guide.#2523
11c2778b
Thanks @thomasheyenbrock! - BREAKING: The following props of theGraphiQL
component have been changed:defaultVariableEditorOpen
anddefaultSecondaryEditorOpen
have been merged into one propdefaultEditorToolsVisibility
. The default behavior if this prop is not passed is that the editor tools are shown if at least one of the secondary editors has contents. You can pass the following values to the prop:false
hides the editor tools.true
shows the editor tools."variables"
explicitly shows the variables editor."headers"
explicitly shows the headers editor.docExplorerOpen
,onToggleDocs
andonToggleHistory
have been removed. They are replaced by the more generic propsvisiblePlugin
(for controlling which plugin is visible) andonTogglePluginVisibility
(which is called each time the visibility of any plugin changes).headerEditorEnabled
prop has been renamed toisHeadersEditorEnabled
.ResultsTooltip
prop has been renamed toresponseTooltip
.tabs
prop has therefore been replaced with a proponTabChange
. If you used thetabs
prop before to pass this function you can change your implementation like so:Minor Changes
4f714053
Thanks @thomasheyenbrock! - GraphiQL now ships with a dark theme. By default the interface respects the system settings, the theme can also be explicitly chosen via the new settings dialog.Patch Changes
e1c6e3bf
,d1805200
,b5a7bee1
,11c2778b
,01cd313b
,41236709
]:@graphiql/[email protected]
Minor Changes
#2523
e1c6e3bf
Thanks @thomasheyenbrock! - BREAKING: TheonHasCompletion
export has been removed as it is only meant to be used internally.#2523
d1805200
Thanks @thomasheyenbrock! - Add new components:Button
,ButtonGroup
,Dialog
,Menu
,Spinner
,Tab
,Tabs
,Tooltip
,UnStyledButton
and lots of icon components)QueryEditor
,VariableEditor
,HeaderEditor
andResponseEditor
)ExecuteButton
,ToolbarButton
,ToolbarMenu
andToolbarSelect
)Argument
,DefaultValue
,DeprecationReason
,Directive
,DocExplorer
,ExplorerSection
,FieldDocumentation
,FieldLink
,SchemaDocumentation
,Search
,TypeDocumentation
andTypeLink
)History
componentGraphiQLProvider
component that renders all other existing provider components from@graphiql/react
for ease of use#2523
b5a7bee1
Thanks @thomasheyenbrock! - BREAKING: Add a new context provider for plugins. This induces changes to the following other contexts and their provider components:isVisible
and the methodshide
andshow
of theExplorerContext
have been removed. Also, the propertyisVisible
and the methodshide
,show
andtoggle
of theHistoryContext
have been removed. Visibility state of plugins is now part of thePluginContext
using thevisiblePlugin
property. The visibility state can be altered using thesetVisiblePlugin
method of thePluginContext
.isVisible
prop of theExplorerContextProvider
has been removed. For controlling the visibility state of plugins you can now use thevisiblePlugin
prop of thePluginContextProvider
.onToggle
prop of theHistoryContextProvider
and theonToggleVisibility
prop of theExplorerContextProvider
have been removed. For listening on visibility changes for any plugin you can now use theonTogglePluginVisibility
prop of thePluginContextProvider
.#2523
11c2778b
Thanks @thomasheyenbrock! - BREAKING: TheResponseTooltip
prop of theResponseEditor
has been renamed toresponseTooltip
Patch Changes
d1805200
,01cd313b
,41236709
]:@graphiql/[email protected]
Minor Changes
#2523
01cd313b
Thanks @thomasheyenbrock! - BREAKING: Don't passshouldPersistHeaders
anymore when invoking the fetcher function. This value can be looked up by consuming theEditorContext
:#2523
41236709
Thanks @thomasheyenbrock! - Add aclear
method toStorage
classes