Options
All
  • Public
  • Public/Protected
  • All
Menu

Abstract base Rewriter class Extend this class and overwrite its methods to create a new rewriter

Hierarchy

Index

Constructors

constructor

  • new Rewriter(__namedParameters: object): Rewriter
  • Parameters

    • __namedParameters: object
      • fieldName: undefined | string
      • matchConditions: undefined | function[]
      • rootTypes: undefined | ("query" | "mutation" | "fragment")[]

    Returns Rewriter

Properties

Protected Optional fieldName

fieldName: undefined | string

Protected Optional matchConditions

matchConditions: matchCondition[]

Protected rootTypes

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

Methods

Protected extractReponseElement

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

    • response: any
    • key: string
    • Optional index: undefined | number

    Returns any

matches

  • matches(nodeAndVarDefs: NodeAndVarDefs, parents: ReadonlyArray<ASTNode>): boolean
  • Parameters

    • nodeAndVarDefs: NodeAndVarDefs
    • parents: ReadonlyArray<ASTNode>

    Returns boolean

rewriteQuery

  • rewriteQuery(nodeAndVarDefs: NodeAndVarDefs, variables: Variables): NodeAndVarDefs

rewriteResponse

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

    • response: any
    • key: string
    • Optional index: undefined | number

    Returns any

Protected rewriteResponseElement

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

    • response: any
    • newElement: any
    • key: string
    • Optional index: undefined | number

    Returns any

rewriteVariables

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