Headers to be set when opening a new tab.
The initial content of the operation editor when loading GraphiQL and there is
no saved query in storage and no initialQuery
prop.
This value is used only for the first tab. Additional tabs will open with an empty operation editor.
A map of fragment definitions using the fragment name as a key which are made available to include in the query.
Stores an error raised during introspecting or building the GraphQL schema from the introspection result.
A function which accepts GraphQL HTTP parameters and returns a Promise
,
Observable
or AsyncIterable
that returns the GraphQL response in
parsed JSON format.
We suggest using the createGraphiQLFetcher
utility from @graphiql/toolkit
to create these fetcher functions.
A function to determine which field leafs are automatically added when
trying to execute a query with missing selection sets. It will be called
with the GraphQLType
for which fields need to be added.
The Monaco Editor instance used in the request headers editor, used to edit HTTP headers.
The contents of the request headers editor when initially rendering the provider component.
The contents of the operation editor when initially rendering the provider component.
The contents of the variables editor when initially rendering the provider component.
If there is currently a GraphQL request in-flight. For multipart
requests like subscriptions, this will be true
while fetching the
first partial response and false
while fetching subsequent batches.
If there currently is an introspection request in-flight.
Invoked when the current contents of the operation editor are copied to the clipboard.
Invoked when the prettify callback is invoked.
The operation name that will be sent with all GraphQL requests.
A list of all current plugins, including the built-in ones (the doc explorer and the history).
The Monaco Editor instance used in the operation editor.
The plugin which is used to display the reference documentation when selecting a type.
Pass null
to remove plugin.
A counter that is incremented each time introspection is triggered or the schema state is updated.
The Monaco Editor instance used in the response editor.
The current GraphQL schema.
The last type selected by the user.
false
when schema
is provided via props
as GraphQLSchema | null
If the contents of the request headers editor are persisted in storage.
Represents an active GraphQL subscription.
For multipart operations such as subscriptions, this
will hold an Unsubscribable
object while the request is in-flight. It
remains non-null until the operation completes or is manually unsubscribed.
A list of state objects for each tab.
Unique ID of the GraphiQL instance, which will be suffixed to the URIs for operations, variables, headers, and response editors.
A list of errors from validating the current GraphQL schema. The schema is valid if and only if this list is empty.
The Monaco Editor instance used in the variables editor.
The plugin which is currently visible.
Invoked when the operation name changes. Possible triggers are:
The operation name after it has been changed.
Invoked when the state of the tabs changes. Possible triggers are:
The tab state after it has been updated.
Invoked when the visibility state of any plugin changes.
The plugin object that is now visible. If no plugin
is visible, the function will be invoked with null
.
Generated using TypeDoc
The index of the currently active tab with regards to the
tabs
list of this object.