Options
All
  • Public
  • Public/Protected
  • All
Menu

GraphQL Service Provider

class

GraphQLProvider

Hierarchy

  • EventEmitter
    • GraphQLProvider

Implements

  • IServiceProvider

Index

Constructors

constructor

  • new GraphQLProvider(schemas: IUniq<string>, respManager: IBaseResponseManager): GraphQLProvider

Properties

gqlSchemas

gqlSchemas: IUniq<gql.GraphQLSchema>

introSchemas

introSchemas: IUniq<IGraphqlTypes>

Private respManager

respManager: IBaseResponseManager

Private schemas

schemas: IUniq<string>

Static defaultMaxListeners

defaultMaxListeners: number

Methods

add

addListener

  • addListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

Private buildSchema

  • buildSchema(input: string): GraphQLSchema

create

delete

  • delete(id: string): void

emit

  • emit(event: string | symbol, ...args: any[]): boolean
  • Parameters

    • event: string | symbol
    • Rest ...args: any[]

    Returns boolean

eventNames

  • eventNames(): Array<string | symbol>
  • Returns Array<string | symbol>

export

  • export(ids: string[]): object

find

getMaxListeners

  • getMaxListeners(): number
  • Returns number

Private handler

  • handler(id: string, schema: Promise<IGraphqlTypes>): (Anonymous function)

introSchema

listenerCount

  • listenerCount(type: string | symbol): number
  • Parameters

    • type: string | symbol

    Returns number

listeners

  • listeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

off

  • off(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

on

  • on(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

once

  • once(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependListener

  • prependListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

prependOnceListener

  • prependOnceListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

rawListeners

  • rawListeners(event: string | symbol): Function[]
  • Parameters

    • event: string | symbol

    Returns Function[]

Private readBody

  • readBody(request: IncomingMessage, response: ServerResponse, callback: function): void
  • Parameters

    • request: IncomingMessage
    • response: ServerResponse
    • callback: function
        • (body: any): void
        • Parameters

          • body: any

          Returns void

    Returns void

readGraphQL

  • readGraphQL(files: string[], callback: function): Promise<void>
  • Read GraphQL files recursively

    Parameters

    • files: string[]
    • callback: function
        • (err: Error | null, files?: undefined | object): void
        • Parameters

          • err: Error | null
          • Optional files: undefined | object

          Returns void

    Returns Promise<void>

removeAllListeners

  • removeAllListeners(event?: string | symbol): this
  • Parameters

    • Optional event: string | symbol

    Returns this

removeListener

  • removeListener(event: string | symbol, listener: function): this
  • Parameters

    • event: string | symbol
    • listener: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns this

setMaxListeners

  • setMaxListeners(n: number): this
  • Parameters

    • n: number

    Returns this

validate

  • validate(files: string[], callback: function): Promise<void>
  • Validate GraphQL files

    Parameters

    • files: string[]
    • callback: function
        • (err: Error | null, action: object): void
        • Parameters

          • err: Error | null
          • action: object
            • files: string[]
            • Optional git?: IGit

          Returns void

    Returns Promise<void>

Static listenerCount

  • listenerCount(emitter: EventEmitter, event: string | symbol): number
  • deprecated

    since v4.0.0

    Parameters

    • emitter: EventEmitter
    • event: string | symbol

    Returns number

Generated using TypeDoc