File tree Expand file tree Collapse file tree
packages/graphiql/src/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' graphiql ' : patch
3+ ---
4+
5+ Fix cannot access ` initialHeaders ` before initialization
Original file line number Diff line number Diff line change @@ -195,6 +195,8 @@ export type GraphiQLInterfaceProps = WriteableEditorProps &
195195 } ;
196196
197197export function GraphiQLInterface ( props : GraphiQLInterfaceProps ) {
198+ const isHeadersEditorEnabled = props . isHeadersEditorEnabled ?? true ;
199+
198200 const editorContext = useEditorContext ( { nonNull : true } ) ;
199201 const executionContext = useExecutionContext ( { nonNull : true } ) ;
200202 const schemaContext = useSchemaContext ( { nonNull : true } ) ;
@@ -305,8 +307,6 @@ export function GraphiQLInterface(props: GraphiQLInterfaceProps) {
305307 isChildComponentType ( child , GraphiQL . Footer ) ,
306308 ) ;
307309
308- const isHeadersEditorEnabled = props . isHeadersEditorEnabled ?? true ;
309-
310310 const onClickReference = ( ) => {
311311 if ( pluginResize . hiddenElement === 'first' ) {
312312 pluginResize . setHiddenElement ( null ) ;
You can’t perform that action at this time.
0 commit comments