⎆⠀constructor

GQLBase. ⎆⠀constructor

new ⎆⠀constructor(modelData, requestData)

Request data is passed to this object when constructed. Typically these
objects, and their children, are instantiated by its own static MUTATORS
and RESOLVERS. They should contain request specific state if any is to
be shared.

These can be considered request specific controllers for the object in
question. The base class takes a single object which should contain all
the HTTP/S request data and the graphQLParams is provided as the object
{ query, variables, operationName, raw }.

When used with express-graphql, the requestData object has the format
{ req, res, gql } where
• req is an Express 4.x request object
• res is an Express 4.x response object
• gql is the graphQLParams object in the format of
{ query, variables, operationName, raw }
See https://github.com/graphql/express-graphql for more info

Source:
Parameters:
Name Type Description
modelData mixed

this, typically an object, although anything
really is supported, represents the model data for our GraphQL object
instance.

requestData Object

see description above