@envelop/core 3.0.0-alpha-d0d0776.0 → 3.0.0-alpha-ccec0fc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/create.js +28 -0
- package/cjs/enable-if.js +24 -0
- package/cjs/index.js +16 -0
- package/cjs/orchestrator.js +452 -0
- package/cjs/package.json +1 -0
- package/cjs/plugins/use-envelop.js +13 -0
- package/cjs/plugins/use-error-handler.js +21 -0
- package/cjs/plugins/use-extend-context.js +9 -0
- package/cjs/plugins/use-immediate-introspection.js +50 -0
- package/cjs/plugins/use-logger.js +45 -0
- package/cjs/plugins/use-masked-errors.js +90 -0
- package/cjs/plugins/use-payload-formatter.js +21 -0
- package/cjs/plugins/use-schema.js +29 -0
- package/cjs/plugins/use-timing.js +138 -0
- package/cjs/traced-orchestrator.js +136 -0
- package/cjs/traced-schema.js +68 -0
- package/cjs/utils.js +221 -0
- package/esm/create.js +24 -0
- package/esm/enable-if.js +19 -0
- package/esm/index.js +13 -0
- package/esm/orchestrator.js +448 -0
- package/esm/plugins/use-envelop.js +9 -0
- package/esm/plugins/use-error-handler.js +17 -0
- package/esm/plugins/use-extend-context.js +5 -0
- package/esm/plugins/use-immediate-introspection.js +46 -0
- package/esm/plugins/use-logger.js +41 -0
- package/esm/plugins/use-masked-errors.js +84 -0
- package/esm/plugins/use-payload-formatter.js +17 -0
- package/esm/plugins/use-schema.js +23 -0
- package/esm/plugins/use-timing.js +134 -0
- package/esm/traced-orchestrator.js +132 -0
- package/esm/traced-schema.js +64 -0
- package/esm/utils.js +207 -0
- package/package.json +25 -18
- package/{create.d.ts → typings/create.d.ts} +1 -1
- package/{enable-if.d.ts → typings/enable-if.d.ts} +0 -0
- package/typings/index.d.ts +13 -0
- package/{orchestrator.d.ts → typings/orchestrator.d.ts} +1 -1
- package/{plugins → typings/plugins}/use-envelop.d.ts +0 -0
- package/{plugins → typings/plugins}/use-error-handler.d.ts +1 -1
- package/{plugins → typings/plugins}/use-extend-context.d.ts +0 -0
- package/{plugins → typings/plugins}/use-immediate-introspection.d.ts +0 -0
- package/{plugins → typings/plugins}/use-logger.d.ts +1 -1
- package/{plugins → typings/plugins}/use-masked-errors.d.ts +2 -2
- package/{plugins → typings/plugins}/use-payload-formatter.d.ts +1 -1
- package/{plugins → typings/plugins}/use-schema.d.ts +1 -1
- package/{plugins → typings/plugins}/use-timing.d.ts +3 -3
- package/{traced-orchestrator.d.ts → typings/traced-orchestrator.d.ts} +1 -1
- package/{traced-schema.d.ts → typings/traced-schema.d.ts} +1 -1
- package/{utils.d.ts → typings/utils.d.ts} +1 -1
- package/index.d.ts +0 -13
- package/index.js +0 -1295
- package/index.mjs +0 -1257
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from '@envelop/types';
|
|
2
|
-
import { GraphQLError, GraphQLErrorExtensions } from 'graphql';
|
|
2
|
+
import { GraphQLError, GraphQLErrorExtensions } from '@graphql-tools/graphql';
|
|
3
3
|
export declare const DEFAULT_ERROR_MESSAGE = "Unexpected error.";
|
|
4
4
|
export declare class EnvelopError extends GraphQLError {
|
|
5
5
|
constructor(message: string, extensions?: GraphQLErrorExtensions);
|
|
@@ -36,4 +36,4 @@ export declare type UseMaskedErrorsOpts = {
|
|
|
36
36
|
*/
|
|
37
37
|
handleValidationErrors?: boolean;
|
|
38
38
|
};
|
|
39
|
-
export declare const useMaskedErrors: (opts?: UseMaskedErrorsOpts
|
|
39
|
+
export declare const useMaskedErrors: (opts?: UseMaskedErrorsOpts) => Plugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Plugin, TypedExecutionArgs } from '@envelop/types';
|
|
2
|
-
import { ExecutionResult } from 'graphql';
|
|
2
|
+
import { ExecutionResult } from '@graphql-tools/graphql';
|
|
3
3
|
export declare type FormatterFunction = (result: ExecutionResult<any, any>, args: TypedExecutionArgs<any>) => false | ExecutionResult<any, any>;
|
|
4
4
|
export declare const usePayloadFormatter: (formatter: FormatterFunction) => Plugin;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GraphQLSchema } from 'graphql';
|
|
1
|
+
import { GraphQLSchema } from '@graphql-tools/graphql';
|
|
2
2
|
import { DefaultContext, Maybe, Plugin } from '@envelop/types';
|
|
3
3
|
export declare const useSchema: (schema: GraphQLSchema) => Plugin;
|
|
4
4
|
export declare const useLazyLoadedSchema: (schemaLoader: (context: Maybe<DefaultContext>) => GraphQLSchema) => Plugin;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Plugin } from '@envelop/types';
|
|
2
|
-
import { DocumentNode, ExecutionArgs, GraphQLResolveInfo, Source, SubscriptionArgs } from 'graphql';
|
|
3
|
-
import { envelopIsIntrospectionSymbol } from '../utils';
|
|
2
|
+
import { DocumentNode, ExecutionArgs, GraphQLResolveInfo, Source, SubscriptionArgs } from '@graphql-tools/graphql';
|
|
3
|
+
import { envelopIsIntrospectionSymbol } from '../utils.js';
|
|
4
4
|
export declare type ResultTiming = {
|
|
5
5
|
ms: number;
|
|
6
6
|
ns: number;
|
|
@@ -17,5 +17,5 @@ export declare type TimingPluginOptions = {
|
|
|
17
17
|
declare type InternalPluginContext = {
|
|
18
18
|
[envelopIsIntrospectionSymbol]?: true;
|
|
19
19
|
};
|
|
20
|
-
export declare const useTiming: (rawOptions?: TimingPluginOptions
|
|
20
|
+
export declare const useTiming: (rawOptions?: TimingPluginOptions) => Plugin<InternalPluginContext>;
|
|
21
21
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArbitraryObject } from '@envelop/types';
|
|
2
|
-
import { EnvelopOrchestrator } from './orchestrator';
|
|
2
|
+
import { EnvelopOrchestrator } from './orchestrator.js';
|
|
3
3
|
declare const tracingSymbol: unique symbol;
|
|
4
4
|
export declare function traceOrchestrator<TInitialContext extends ArbitraryObject, TPluginsContext extends ArbitraryObject>(orchestrator: EnvelopOrchestrator<TInitialContext, TPluginsContext>): EnvelopOrchestrator<TInitialContext & {
|
|
5
5
|
[tracingSymbol]?: {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GraphQLSchema } from 'graphql';
|
|
1
|
+
import { GraphQLSchema } from '@graphql-tools/graphql';
|
|
2
2
|
export declare const trackedSchemaSymbol: unique symbol;
|
|
3
3
|
export declare const resolversHooksSymbol: unique symbol;
|
|
4
4
|
export declare function prepareTracedSchema(schema: GraphQLSchema | null | undefined): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ASTNode, DocumentNode, OperationDefinitionNode, Source, ExecutionResult, SubscriptionArgs, ExecutionArgs } from 'graphql';
|
|
1
|
+
import { ASTNode, DocumentNode, OperationDefinitionNode, Source, ExecutionResult, SubscriptionArgs, ExecutionArgs } from '@graphql-tools/graphql';
|
|
2
2
|
import { AsyncIterableIteratorOrValue, ExecuteFunction, SubscribeFunction, PromiseOrValue, DefaultContext, OnExecuteDoneEventPayload, OnExecuteDoneHookResult, OnExecuteDoneHookResultOnNextHook } from '@envelop/types';
|
|
3
3
|
export declare const envelopIsIntrospectionSymbol: unique symbol;
|
|
4
4
|
export declare function isOperationDefinition(def: ASTNode): def is OperationDefinitionNode;
|
package/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from '@envelop/types';
|
|
2
|
-
export * from './create';
|
|
3
|
-
export * from './utils';
|
|
4
|
-
export * from './plugins/use-envelop';
|
|
5
|
-
export * from './plugins/use-logger';
|
|
6
|
-
export * from './plugins/use-timing';
|
|
7
|
-
export * from './plugins/use-schema';
|
|
8
|
-
export * from './plugins/use-error-handler';
|
|
9
|
-
export * from './plugins/use-extend-context';
|
|
10
|
-
export * from './plugins/use-payload-formatter';
|
|
11
|
-
export * from './plugins/use-masked-errors';
|
|
12
|
-
export * from './plugins/use-immediate-introspection';
|
|
13
|
-
export * from './enable-if';
|