@envelop/types 5.2.1 → 5.2.2

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/LICENSE CHANGED
@@ -1,6 +1,8 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Dotan Simha
3
+ Copyright (c) 2018-2020 Graphcool
4
+ Copyright (c) 2020-2021 Prisma
5
+ Copyright (c) 2021- The Guild
4
6
 
5
7
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
8
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@envelop/types",
3
- "version": "5.2.1",
3
+ "version": "5.2.2",
4
4
  "sideEffects": false,
5
5
  "dependencies": {
6
6
  "@whatwg-node/promise-helpers": "^1.0.0",
@@ -8,9 +8,10 @@
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/n1ru4l/envelop.git",
12
- "directory": "packages/types"
11
+ "url": "https://github.com/graphql-hive/graphql-yoga.git",
12
+ "directory": "packages/envelop/types"
13
13
  },
14
+ "homepage": "https://github.com/graphql-hive/graphql-yoga/tree/main/packages/envelop/types#readme",
14
15
  "author": "Dotan Simha <dotansimha@gmail.com>",
15
16
  "license": "MIT",
16
17
  "engines": {
@@ -1,6 +1,6 @@
1
- import { GetEnvelopedFn } from './get-enveloped.cjs';
2
- import { Plugin } from './plugin.cjs';
3
- import { Spread, TuplifyUnion, Unarray } from './utils.cjs';
1
+ import type { GetEnvelopedFn } from './get-enveloped.cjs';
2
+ import type { Plugin } from './plugin.cjs';
3
+ import type { Spread, TuplifyUnion, Unarray } from './utils.cjs';
4
4
  export interface DefaultContext extends Record<string | symbol | number, unknown> {
5
5
  }
6
6
  export type ComposeContextArray<V> = V extends [] ? [] : V extends [Plugin<infer Ctx>] ? [Ctx] : V extends [Plugin<infer Ctx>, ...infer R] ? [Ctx, ...ComposeContextArray<R>] : [{
@@ -1,6 +1,6 @@
1
- import { GetEnvelopedFn } from './get-enveloped.js';
2
- import { Plugin } from './plugin.js';
3
- import { Spread, TuplifyUnion, Unarray } from './utils.js';
1
+ import type { GetEnvelopedFn } from './get-enveloped.js';
2
+ import type { Plugin } from './plugin.js';
3
+ import type { Spread, TuplifyUnion, Unarray } from './utils.js';
4
4
  export interface DefaultContext extends Record<string | symbol | number, unknown> {
5
5
  }
6
6
  export type ComposeContextArray<V> = V extends [] ? [] : V extends [Plugin<infer Ctx>] ? [Ctx] : V extends [Plugin<infer Ctx>, ...infer R] ? [Ctx, ...ComposeContextArray<R>] : [{
@@ -1,7 +1,7 @@
1
- import { ExecuteFunction, ParseFunction, SubscribeFunction, ValidateFunction } from './graphql.cjs';
2
- import { Plugin } from './plugin.cjs';
3
- import { ArbitraryObject, PromiseOrValue, Spread } from './utils.cjs';
4
- export { ArbitraryObject } from './utils.cjs';
1
+ import type { ExecuteFunction, ParseFunction, SubscribeFunction, ValidateFunction } from './graphql.cjs';
2
+ import type { Plugin } from './plugin.cjs';
3
+ import type { ArbitraryObject, PromiseOrValue, Spread } from './utils.cjs';
4
+ export type { ArbitraryObject } from './utils.cjs';
5
5
  export type EnvelopContextFnWrapper<TFunction extends Function, ContextType = unknown> = (context: ContextType) => TFunction;
6
6
  export type GetEnvelopedFn<PluginsContext> = {
7
7
  <InitialContext extends ArbitraryObject>(initialContext?: InitialContext): {
@@ -1,7 +1,7 @@
1
- import { ExecuteFunction, ParseFunction, SubscribeFunction, ValidateFunction } from './graphql.js';
2
- import { Plugin } from './plugin.js';
3
- import { ArbitraryObject, PromiseOrValue, Spread } from './utils.js';
4
- export { ArbitraryObject } from './utils.js';
1
+ import type { ExecuteFunction, ParseFunction, SubscribeFunction, ValidateFunction } from './graphql.js';
2
+ import type { Plugin } from './plugin.js';
3
+ import type { ArbitraryObject, PromiseOrValue, Spread } from './utils.js';
4
+ export type { ArbitraryObject } from './utils.js';
5
5
  export type EnvelopContextFnWrapper<TFunction extends Function, ContextType = unknown> = (context: ContextType) => TFunction;
6
6
  export type GetEnvelopedFn<PluginsContext> = {
7
7
  <InitialContext extends ArbitraryObject>(initialContext?: InitialContext): {
@@ -1,4 +1,4 @@
1
- import { ObjMap } from './utils.cjs';
1
+ import type { ObjMap } from './utils.cjs';
2
2
  export interface ExecutionArgs {
3
3
  schema: any;
4
4
  document: any;
@@ -1,4 +1,4 @@
1
- import { ObjMap } from './utils.js';
1
+ import type { ObjMap } from './utils.js';
2
2
  export interface ExecutionArgs {
3
3
  schema: any;
4
4
  document: any;
@@ -1,6 +1,6 @@
1
- import { ExecuteFunction, ExecutionArgs, ExecutionResult, IncrementalExecutionResult, ParseFunction, SubscribeFunction, ValidateFunction, ValidateFunctionParameter } from './graphql.cjs';
2
- import { Plugin } from './plugin.cjs';
3
- import { AsyncIterableIteratorOrValue, Maybe, PromiseOrValue } from './utils.cjs';
1
+ import type { ExecuteFunction, ExecutionArgs, ExecutionResult, IncrementalExecutionResult, ParseFunction, SubscribeFunction, ValidateFunction, ValidateFunctionParameter } from './graphql.cjs';
2
+ import type { Plugin } from './plugin.cjs';
3
+ import type { AsyncIterableIteratorOrValue, Maybe, PromiseOrValue } from './utils.cjs';
4
4
  export type DefaultArgs = Record<string, unknown>;
5
5
  export type SetSchemaFn = (newSchema: any) => void;
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { ExecuteFunction, ExecutionArgs, ExecutionResult, IncrementalExecutionResult, ParseFunction, SubscribeFunction, ValidateFunction, ValidateFunctionParameter } from './graphql.js';
2
- import { Plugin } from './plugin.js';
3
- import { AsyncIterableIteratorOrValue, Maybe, PromiseOrValue } from './utils.js';
1
+ import type { ExecuteFunction, ExecutionArgs, ExecutionResult, IncrementalExecutionResult, ParseFunction, SubscribeFunction, ValidateFunction, ValidateFunctionParameter } from './graphql.js';
2
+ import type { Plugin } from './plugin.js';
3
+ import type { AsyncIterableIteratorOrValue, Maybe, PromiseOrValue } from './utils.js';
4
4
  export type DefaultArgs = Record<string, unknown>;
5
5
  export type SetSchemaFn = (newSchema: any) => void;
6
6
  /**
@@ -1,4 +1,4 @@
1
- import { OnContextBuildingHook, OnEnvelopedHook, OnExecuteHook, OnParseHook, OnPluginInitHook, OnSchemaChangeHook, OnSubscribeHook, OnValidateHook } from './hooks.cjs';
1
+ import type { OnContextBuildingHook, OnEnvelopedHook, OnExecuteHook, OnParseHook, OnPluginInitHook, OnSchemaChangeHook, OnSubscribeHook, OnValidateHook } from './hooks.cjs';
2
2
  import type { PromiseOrValue } from './utils.cjs';
3
3
  export interface Plugin<PluginContext extends Record<string, any> = {}> {
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { OnContextBuildingHook, OnEnvelopedHook, OnExecuteHook, OnParseHook, OnPluginInitHook, OnSchemaChangeHook, OnSubscribeHook, OnValidateHook } from './hooks.js';
1
+ import type { OnContextBuildingHook, OnEnvelopedHook, OnExecuteHook, OnParseHook, OnPluginInitHook, OnSchemaChangeHook, OnSubscribeHook, OnValidateHook } from './hooks.js';
2
2
  import type { PromiseOrValue } from './utils.js';
3
3
  export interface Plugin<PluginContext extends Record<string, any> = {}> {
4
4
  /**
@@ -6,7 +6,7 @@ export type OptionalPropertyNames<T> = {
6
6
  export type SpreadProperties<L, R, K extends keyof L & keyof R> = {
7
7
  [P in K]: L[P] | Exclude<R[P], undefined>;
8
8
  };
9
- /** @deprecated Because it can cause https://github.com/n1ru4l/envelop/issues/1120. */
9
+ /** @deprecated Because it can cause https://github.com/graphql-hive/envelop/issues/1120. */
10
10
  export type Id<T> = T extends infer U ? {
11
11
  [K in keyof U]: U[K];
12
12
  } : never;
@@ -18,7 +18,7 @@ export type Push<T extends any[], V> = [...T, V];
18
18
  export type TuplifyUnion<T, L = LastOf<T>, N = [T] extends [never] ? true : false> = true extends N ? [] : Push<TuplifyUnion<Exclude<T, L>>, L>;
19
19
  export type Unarray<T> = T extends Array<infer U> ? U : T;
20
20
  export type ArbitraryObject = Record<string | number | symbol, any>;
21
- export { MaybePromise as PromiseOrValue } from '@whatwg-node/promise-helpers';
21
+ export type { MaybePromise as PromiseOrValue } from '@whatwg-node/promise-helpers';
22
22
  export type AsyncIterableIteratorOrValue<T> = T | AsyncIterableIterator<T>;
23
23
  export type Maybe<T> = T | null | undefined;
24
24
  export type Optional<T> = T | Maybe<T> | false;
@@ -6,7 +6,7 @@ export type OptionalPropertyNames<T> = {
6
6
  export type SpreadProperties<L, R, K extends keyof L & keyof R> = {
7
7
  [P in K]: L[P] | Exclude<R[P], undefined>;
8
8
  };
9
- /** @deprecated Because it can cause https://github.com/n1ru4l/envelop/issues/1120. */
9
+ /** @deprecated Because it can cause https://github.com/graphql-hive/envelop/issues/1120. */
10
10
  export type Id<T> = T extends infer U ? {
11
11
  [K in keyof U]: U[K];
12
12
  } : never;
@@ -18,7 +18,7 @@ export type Push<T extends any[], V> = [...T, V];
18
18
  export type TuplifyUnion<T, L = LastOf<T>, N = [T] extends [never] ? true : false> = true extends N ? [] : Push<TuplifyUnion<Exclude<T, L>>, L>;
19
19
  export type Unarray<T> = T extends Array<infer U> ? U : T;
20
20
  export type ArbitraryObject = Record<string | number | symbol, any>;
21
- export { MaybePromise as PromiseOrValue } from '@whatwg-node/promise-helpers';
21
+ export type { MaybePromise as PromiseOrValue } from '@whatwg-node/promise-helpers';
22
22
  export type AsyncIterableIteratorOrValue<T> = T | AsyncIterableIterator<T>;
23
23
  export type Maybe<T> = T | null | undefined;
24
24
  export type Optional<T> = T | Maybe<T> | false;