Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface EditorProps

Hierarchy

  • {}
    • EditorProps

Index

Properties

Optional defaultTabs

defaultTabs: 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 there is no tab state persisted in storage.

example
<GraphiQL
  defaultTabs={[
    { query: 'query myExampleQuery {}' },
    { query: '{ id }' }
  ]}
/>

Optional externalFragments

externalFragments: string | FragmentDefinitionNode[]

With this prop you can pass so-called "external" fragments that will be included in the query document (depending on usage). You can either pass the fragments using SDL (passing a string) or you can pass a list of FragmentDefinitionNode objects.

Optional initialHeaders

initialHeaders: EditorSlice["initialHeaders"]

Optional initialQuery

initialQuery: EditorSlice["initialQuery"]

Optional initialVariables

initialVariables: EditorSlice["initialVariables"]

Optional onPrettifyQuery

onPrettifyQuery: EditorSlice["onPrettifyQuery"]

Optional shouldPersistHeaders

shouldPersistHeaders: undefined | false | true

This prop toggles if the contents of the request headers editor are persisted in storage.

default

false

Generated using TypeDoc