@graphql-mesh/runtime
#
Type aliases- APIContext
- ExecuteMeshFn
- GetMeshOptions
- MeshContext
- MeshResolvedSource
- ProjectionOptions
- Requester
- SelectedFields
- SubscribeMeshFn
#
Functions#
Type aliases#
APIContextƬ APIContext: object
#
Type declaration:Name | Type |
---|---|
api | Record<string, (args : any, projectionOptions : ProjectionOptions) => Promise<any\>\> |
rawSource | RawSourceOutput |
Defined in: packages/runtime/src/types.ts:75
#
ExecuteMeshFnƬ ExecuteMeshFn<TData, TVariables, TContext, TRootValue\>: (document
: GraphQLOperation<TData, TVariables\>, variables
: TVariables, context?
: TContext, rootValue?
: TRootValue, operationName?
: string) => Promise<TData | null | undefined\>
#
Type parameters:Name | Default |
---|---|
TData | any |
TVariables | any |
TContext | any |
TRootValue | any |
#
Type declaration:â–¸ (document
: GraphQLOperation<TData, TVariables\>, variables
: TVariables, context?
: TContext, rootValue?
: TRootValue, operationName?
: string): Promise<TData | null | undefined\>
#
Parameters:Name | Type |
---|---|
document | GraphQLOperation<TData, TVariables\> |
variables | TVariables |
context? | TContext |
rootValue? | TRootValue |
operationName? | string |
Returns: Promise<TData | null | undefined\>
Defined in: packages/runtime/src/types.ts:33
#
GetMeshOptionsƬ GetMeshOptions: object
#
Type declaration:Name | Type |
---|---|
additionalResolvers ? | IResolvers |
additionalTypeDefs ? | DocumentNode[] |
cache | KeyValueCache |
ignoreAdditionalResolvers ? | boolean |
liveQueryInvalidations ? | LiveQueryInvalidation[] |
merger | MergerFn |
pubsub | MeshPubSub |
sources | MeshResolvedSource[] |
transforms ? | MeshTransform[] |
Defined in: packages/runtime/src/types.ts:15
#
MeshContextƬ MeshContext: { [key: string]: APIContext; [MESH_CONTEXT_SYMBOL]
: true } & { cache
: KeyValueCache ; pubsub
: MeshPubSub }
Defined in: packages/runtime/src/types.ts:80
#
MeshResolvedSourceƬ MeshResolvedSource<TContext\>: object
#
Type parameters:Name | Default |
---|---|
TContext | any |
#
Type declaration:Name | Type |
---|---|
handler | MeshHandler<TContext\> |
name | string |
transforms ? | MeshTransform[] |
Defined in: packages/runtime/src/types.ts:27
#
ProjectionOptionsƬ ProjectionOptions: object
#
Type declaration:Name | Type | Description |
---|---|---|
depth ? | number | If you don't provide custom selection, this is the depth of generated selection set by GraphQL Mesh default: 2 |
fields ? | SelectedFields | Provide selection set in form of object similar to MongoDB's projection example: { foo: { bar: true }, baz: true } |
selectionSet ? | string | Provide selection set in form of GraphQL SDL example: { foo bar baz } |
Defined in: packages/runtime/src/types.ts:57
#
RequesterƬ Requester<C\>: <R, V\>(doc
: DocumentNode, vars?
: V, options?
: C) => Promise<R\>
#
Type parameters:Name | Default |
---|---|
C | any |
#
Type declaration:â–¸ <R, V\>(doc
: DocumentNode, vars?
: V, options?
: C): Promise<R\>
#
Type parameters:Name |
---|
R |
V |
#
Parameters:Name | Type |
---|---|
doc | DocumentNode |
vars? | V |
options? | C |
Returns: Promise<R\>
Defined in: packages/runtime/src/types.ts:49
#
SelectedFieldsƬ SelectedFields: { [fieldName: string]: SelectedFields; } | true
Defined in: packages/runtime/src/types.ts:51
#
SubscribeMeshFnƬ SubscribeMeshFn<TVariables, TContext, TRootValue, TData\>: (document
: GraphQLOperation<TData, TVariables\>, variables?
: TVariables, context?
: TContext, rootValue?
: TRootValue, operationName?
: string) => Promise<TData | null | undefined | AsyncIterableIterator<TData | null | undefined\>\>
#
Type parameters:Name | Default |
---|---|
TVariables | any |
TContext | any |
TRootValue | any |
TData | any |
#
Type declaration:â–¸ (document
: GraphQLOperation<TData, TVariables\>, variables?
: TVariables, context?
: TContext, rootValue?
: TRootValue, operationName?
: string): Promise<TData | null | undefined | AsyncIterableIterator<TData | null | undefined\>\>
#
Parameters:Name | Type |
---|---|
document | GraphQLOperation<TData, TVariables\> |
variables? | TVariables |
context? | TContext |
rootValue? | TRootValue |
operationName? | string |
Returns: Promise<TData | null | undefined | AsyncIterableIterator<TData | null | undefined\>\>
Defined in: packages/runtime/src/types.ts:41
#
Functions#
applyResolversHooksToResolversâ–¸ applyResolversHooksToResolvers(unifiedSchema
: GraphQLSchema, resolvers
: IResolvers, pubsub
: MeshPubSub): IResolvers
#
Parameters:Name | Type |
---|---|
unifiedSchema | GraphQLSchema |
resolvers | IResolvers |
pubsub | MeshPubSub |
Returns: IResolvers
Defined in: packages/runtime/src/resolvers-hooks.ts:98
#
applyResolversHooksToSchemaâ–¸ applyResolversHooksToSchema(schema
: GraphQLSchema, pubsub
: MeshPubSub): GraphQLSchema
#
Parameters:Name | Type |
---|---|
schema | GraphQLSchema |
pubsub | MeshPubSub |
Returns: GraphQLSchema
Defined in: packages/runtime/src/resolvers-hooks.ts:240
#
getMeshâ–¸ getMesh(options
: GetMeshOptions): Promise<{ cache
: KeyValueCache ; contextBuilder
: (initialContextValue?
: any) => Promise<Record<string, any\>\> ; destroy
: () => void ; execute
: ExecuteMeshFn ; liveQueryStore
: InMemoryLiveQueryStore ; pubsub
: MeshPubSub ; rawSources
: RawSourceOutput[] ; schema
: GraphQLSchema ; sdkRequester
: Requester ; subscribe
: SubscribeMeshFn }\>
#
Parameters:Name | Type |
---|---|
options | GetMeshOptions |
Returns: Promise<{ cache
: KeyValueCache ; contextBuilder
: (initialContextValue?
: any) => Promise<Record<string, any\>\> ; destroy
: () => void ; execute
: ExecuteMeshFn ; liveQueryStore
: InMemoryLiveQueryStore ; pubsub
: MeshPubSub ; rawSources
: RawSourceOutput[] ; schema
: GraphQLSchema ; sdkRequester
: Requester ; subscribe
: SubscribeMeshFn }\>
Defined in: packages/runtime/src/get-mesh.ts:20