Skip to main content

TypeInfo

TypeInfo is a utility class which, given a GraphQL schema, can keep track of the current field and type definitions at any point in a GraphQL document AST during a recursive descent by calling enter(node) and leave(node).

Index

Constructors

constructor

  • Parameters

    • schema: GraphQLSchema
    • optionalinitialType: Maybe<GraphQLType>

      Initial type may be provided in rare cases to facilitate traversals beginning somewhere other than documents.

    • optionalfragmentSignatures: Maybe<(fragmentName: string) => Maybe<FragmentSignature>>

    Returns TypeInfo

Accessors

[toStringTag]

  • get [toStringTag](): string
  • Returns string

Methods

enter

  • Parameters

    Returns void

getArgument

getDefaultValue

getDirective

getEnumValue

getFieldDef

getFragmentArgument

getFragmentSignature

  • getFragmentSignature(): Maybe<FragmentSignature>
  • Returns Maybe<FragmentSignature>

getFragmentSignatureByName

  • getFragmentSignatureByName(): (fragmentName: string) => Maybe<FragmentSignature>
  • Returns (fragmentName: string) => Maybe<FragmentSignature>

      • (fragmentName: string): Maybe<FragmentSignature>
      • Parameters

        • fragmentName: string

        Returns Maybe<FragmentSignature>

getInputType

getParentInputType

getParentType

getType

leave

  • Parameters

    Returns void