Skip to content

Commit

Permalink
remove initialTabs. Use defaultTabs instead (#3207)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaMachina authored Jun 2, 2023
1 parent f39f52f commit 4e8d8f1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .changeset/early-socks-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'graphiql': major
'@graphiql/react': minor
---

remove `initialTabs`, use `defaultTabs` instead
6 changes: 1 addition & 5 deletions packages/graphiql-react/src/editor/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,6 @@ export type EditorContextProviderProps = {
* typing in the editor.
*/
headers?: string;
/**
* @deprecated Use `defaultTabs` instead.
*/
initialTabs?: TabDefinition[];
/**
* This prop can be used to define the default set of tabs, with their
* queries, variables, and headers. It will be used as default only if
Expand Down Expand Up @@ -311,7 +307,7 @@ export function EditorContextProvider(props: EditorContextProviderProps) {
query,
variables,
headers,
defaultTabs: props.defaultTabs || props.initialTabs,
defaultTabs: props.defaultTabs,
defaultQuery: props.defaultQuery || DEFAULT_QUERY,
defaultHeaders: props.defaultHeaders,
storage,
Expand Down
2 changes: 0 additions & 2 deletions packages/graphiql-react/src/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export function GraphiQLProvider({
fetcher,
getDefaultFieldNames,
headers,
initialTabs,
inputValueDeprecation,
introspectionQueryName,
maxHistoryLength,
Expand Down Expand Up @@ -59,7 +58,6 @@ export function GraphiQLProvider({
defaultTabs={defaultTabs}
externalFragments={externalFragments}
headers={headers}
initialTabs={initialTabs}
onEditOperationName={onEditOperationName}
onTabChange={onTabChange}
query={query}
Expand Down
2 changes: 0 additions & 2 deletions packages/graphiql/src/components/GraphiQL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ export function GraphiQL({
fetcher,
getDefaultFieldNames,
headers,
initialTabs,
inputValueDeprecation,
introspectionQueryName,
maxHistoryLength,
Expand Down Expand Up @@ -142,7 +141,6 @@ export function GraphiQL({
externalFragments={externalFragments}
fetcher={fetcher}
headers={headers}
initialTabs={initialTabs}
inputValueDeprecation={inputValueDeprecation}
introspectionQueryName={introspectionQueryName}
maxHistoryLength={maxHistoryLength}
Expand Down

0 comments on commit 4e8d8f1

Please sign in to comment.