@graphql-mesh/transform-hive
Version:
18 lines (17 loc) • 1.13 kB
text/typescript
import { ExecutionResult, GraphQLSchema } from 'graphql';
import { HiveClient } from '@graphql-hive/client';
import { MeshTransform, MeshTransformOptions, YamlConfig } from '@graphql-mesh/types';
import { DelegationContext } from '@graphql-tools/delegate';
import { ExecutionRequest } from '@graphql-tools/utils';
interface TransformationContext {
collectUsageCallback: ReturnType<HiveClient['collectUsage']>;
request: ExecutionRequest;
}
export default class HiveTransform implements MeshTransform {
private hiveClient;
constructor({ config, pubsub, logger }: MeshTransformOptions<YamlConfig.HivePlugin>);
transformSchema(schema: GraphQLSchema): GraphQLSchema;
transformRequest(request: ExecutionRequest, delegationContext: DelegationContext, transformationContext: TransformationContext): ExecutionRequest<any, any, any, Record<string, any>, any>;
transformResult(result: ExecutionResult, delegationContext: DelegationContext, transformationContext: TransformationContext): ExecutionResult<import("graphql/jsutils/ObjMap").ObjMap<unknown>, import("graphql/jsutils/ObjMap").ObjMap<unknown>>;
}
export {};