Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SchemaProps

Hierarchy

  • SchemaProps

Index

Properties

Optional dangerouslyAssumeSchemaIsValid

dangerouslyAssumeSchemaIsValid: undefined | false | true

This prop can be used to skip validating the GraphQL schema. This applies to both schemas fetched via introspection and schemas explicitly passed via the schema prop.

IMPORTANT NOTE: Without validating the schema, GraphiQL and its components are vulnerable to numerous exploits and might break. Only use this prop if you have full control over the schema passed to GraphiQL.

default

false

Optional inputValueDeprecation

inputValueDeprecation: undefined | false | true

Can be used to set the equally named option for introspecting a GraphQL server.

default

false

see

Utility for creating the introspection query

Optional introspectionQueryName

introspectionQueryName: undefined | string

Can be used to set a custom operation name for the introspection query.

default

'IntrospectionQuery'

Optional schema

schema: GraphQLSchema | IntrospectionQuery | null

Explicitly provide the GraphiQL schema that shall be used for GraphiQL. If this props is...

  • ...passed and the value is a GraphQL schema, it will be validated and then used for GraphiQL if it is valid.
  • ...passed and the value is the result of an introspection query, a GraphQL schema will be built from this introspection data, it will be validated, and then used for GraphiQL if it is valid.
  • ...set to null, no introspection request will be triggered and GraphiQL will run without a schema.
  • ...set to undefined or not set at all, an introspection request will be triggered. If this request succeeds, a GraphQL schema will be built from the returned introspection data, it will be validated, and then used for GraphiQL if it is valid. If this request fails, GraphiQL will run without a schema.

Optional schemaDescription

schemaDescription: undefined | false | true

Can be used to set the equally named option for introspecting a GraphQL server.

default

false

see

Utility for creating the introspection query

Methods

Optional onSchemaChange

  • onSchemaChange(schema: GraphQLSchema): void
  • Invoked after a new GraphQL schema was built. This includes both fetching the schema via introspection and passing the schema using the schema prop.

    Parameters

    • schema: GraphQLSchema

      The GraphQL schema that is now used for GraphiQL.

    Returns void

Generated using TypeDoc