Class GraphQLWebSocketServer<TContext>
Constructors
Properties
Readonly
schema
schema: GraphQLSchema
Methods
close
- close(code?, reason?): void
Parameters
Optional
code: numberOptional
reason: string
Returns void
serializeError
- serializeError(err): GraphQLError
Returns GraphQLError
subscribe
- subscribe(args, connectionInitPayload?): Promise<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>> | AsyncGenerator<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>, void, void>>
Parameters
- args: RawExecutionArgs
Optional
connectionInitPayload: null | Record<string, unknown>
Returns Promise<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>> | AsyncGenerator<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>, void, void>>
subscribeParsed
- subscribeParsed(args, connectionInitPayload?): Promise<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>> | AsyncGenerator<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>, void, void>>
Returns Promise<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>> | AsyncGenerator<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>, void, void>>
subscribeValidated
- subscribeValidated(args, connectionInitPayload): Promise<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>> | AsyncGenerator<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>, void, void>>
Returns Promise<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>> | AsyncGenerator<ExecutionResult<ObjMap<unknown>, ObjMap<unknown>>, void, void>>
validate
- validate(args): GraphQLError[]
Returns GraphQLError[]