Options
All
  • Public
  • Public/Protected
  • All
Menu

Rewriter which replaces the type of a single argument of a field ex: change from id: String! to id: ID!

Hierarchy

Index

Constructors

constructor

Properties

Protected argName

argName: string

Protected coerceArgumentValue

coerceArgumentValue: function

Type declaration

    • (variable: any, context: object): Maybe<ValueNode>
    • Parameters

      • variable: any
      • context: object

      Returns Maybe<ValueNode>

Protected coerceVariable

coerceVariable: function

Type declaration

    • (variable: any, context: object): any
    • Parameters

      • variable: any
      • context: object

      Returns any

Protected Optional fieldName

fieldName: undefined | string

Protected Optional matchConditions

matchConditions: matchCondition[]

Protected newTypeNode

newTypeNode: TypeNode

Protected oldTypeNode

oldTypeNode: TypeNode

Protected rootTypes

rootTypes: RootType[] = ['query', 'mutation', 'fragment']

Methods

Private extractMatchingVarRefName

  • extractMatchingVarRefName(node: FieldNode): string | false

Protected extractReponseElement

  • extractReponseElement(response: any, key: string, index?: undefined | number): any

matches

  • matches(nodeAndVars: NodeAndVarDefs, parents: ASTNode[]): boolean

rewriteQuery

  • rewriteQuery(__namedParameters: object, variables: Variables): object
  • Parameters

    • __namedParameters: object
      • astNode: NameNode | DocumentNode | OperationDefinitionNode | VariableDefinitionNode | VariableNode | SelectionSetNode | FieldNode | ArgumentNode | FragmentSpreadNode | InlineFragmentNode | FragmentDefinitionNode | IntValueNode | FloatValueNode | StringValueNode | BooleanValueNode | NullValueNode | EnumValueNode | ListValueNode | ObjectValueNode | ObjectFieldNode | DirectiveNode | NamedTypeNode | ListTypeNode | NonNullTypeNode | SchemaDefinitionNode | OperationTypeDefinitionNode | ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | FieldDefinitionNode | InputValueDefinitionNode | InterfaceTypeDefinitionNode | UnionTypeDefinitionNode | EnumTypeDefinitionNode | EnumValueDefinitionNode | InputObjectTypeDefinitionNode | DirectiveDefinitionNode | object | ScalarTypeExtensionNode | ObjectTypeExtensionNode | InterfaceTypeExtensionNode | UnionTypeExtensionNode | EnumTypeExtensionNode | InputObjectTypeExtensionNode
      • variableDefinitions: ReadonlyArray<VariableDefinitionNode>
    • variables: Variables

    Returns object

    • node: FieldNode
    • variableDefinitions: ReadonlyArray<VariableDefinitionNode>

rewriteResponse

  • rewriteResponse(response: any, key: string, index?: undefined | number): any

Protected rewriteResponseElement

  • rewriteResponseElement(response: any, newElement: any, key: string, index?: undefined | number): any

rewriteVariables

  • rewriteVariables(__namedParameters: object, variables: Variables): undefined | object
  • Parameters

    • __namedParameters: object
      • astNode: NameNode | DocumentNode | OperationDefinitionNode | VariableDefinitionNode | VariableNode | SelectionSetNode | FieldNode | ArgumentNode | FragmentSpreadNode | InlineFragmentNode | FragmentDefinitionNode | IntValueNode | FloatValueNode | StringValueNode | BooleanValueNode | NullValueNode | EnumValueNode | ListValueNode | ObjectValueNode | ObjectFieldNode | DirectiveNode | NamedTypeNode | ListTypeNode | NonNullTypeNode | SchemaDefinitionNode | OperationTypeDefinitionNode | ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | FieldDefinitionNode | InputValueDefinitionNode | InterfaceTypeDefinitionNode | UnionTypeDefinitionNode | EnumTypeDefinitionNode | EnumValueDefinitionNode | InputObjectTypeDefinitionNode | DirectiveDefinitionNode | object | ScalarTypeExtensionNode | ObjectTypeExtensionNode | InterfaceTypeExtensionNode | UnionTypeExtensionNode | EnumTypeExtensionNode | InputObjectTypeExtensionNode
    • variables: Variables

    Returns undefined | object

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc