Options
All
  • Public
  • Public/Protected
  • All
Menu

Create a new instance of this class for each request that needs to be processed This class handles rewriting the query and the reponse according to the rewriters passed in

Hierarchy

  • RewriteHandler

Index

Constructors

constructor

Properties

Private hasProcessedRequest

hasProcessedRequest: boolean = false

Private hasProcessedResponse

hasProcessedResponse: boolean = false

matches

matches: RewriterMatch[] = []

Private rewriters

rewriters: Rewriter[]

Methods

rewriteRequest

  • rewriteRequest(query: string, variables?: Variables): object
  • Call this on a graphQL request in middleware before passing on to the real graphql processor

    Parameters

    • query: string

      The graphQL query

    • Optional variables: Variables

      The variables map for the graphQL query

    Returns object

    • query: string
    • variables: undefined | object

rewriteResponse

  • rewriteResponse(response: any): any
  • Call this on the response returned from graphQL before passing it back to the client This will change the output to match what the original query requires

    Parameters

    • response: any

      The graphQL response object

    Returns any

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