New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@envelop/types

Package Overview
Dependencies
Maintainers
1
Versions
629
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@envelop/types - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0-alpha-b257e50.0

3

async-utils.d.ts
import { DefaultContext, OnExecuteDoneEventPayload, OnExecuteDoneHookResult, OnExecuteDoneHookResultOnNextHook } from '@envelop/core';
import { ExecutionResult } from 'graphql';
/**

@@ -9,3 +8,3 @@ * Returns true if the provided object implements the AsyncIterator protocol via

*/
export declare function isAsyncIterable(maybeAsyncIterable: any): maybeAsyncIterable is AsyncIterableIterator<ExecutionResult>;
export declare function isAsyncIterable<T = any>(maybeAsyncIterable: any): maybeAsyncIterable is AsyncIterable<T>;
/**

@@ -12,0 +11,0 @@ * A utility function for hanlding `onExecuteDone` hook result, for simplifying the hanlding of AsyncIterable returned from `execute`.

import { Plugin } from './plugin';
import { GraphQLSchema } from 'graphql';
import { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue';
import { ExecuteFunction, ParseFunction, SubscribeFunction, ValidateFunction } from './graphql';
import { ArbitraryObject, Spread } from './utils';
import { ArbitraryObject, Spread, PromiseOrValue } from './utils';
export { ArbitraryObject } from './utils';

@@ -7,0 +6,0 @@ export declare type EnvelopContextFnWrapper<TFunction extends Function, ContextType = unknown> = (context: ContextType) => TFunction;

@@ -1,2 +0,2 @@

import type { DocumentNode, GraphQLFieldResolver, GraphQLSchema, SubscriptionArgs, ExecutionArgs, GraphQLTypeResolver, subscribe, execute, parse, validate } from 'graphql';
import type { DocumentNode, GraphQLFieldResolver, GraphQLSchema, SubscriptionArgs, ExecutionArgs, GraphQLTypeResolver, subscribe, execute, parse, validate, GraphQLResolveInfo } from 'graphql';
import type { Maybe } from './utils';

@@ -53,1 +53,2 @@ /** @private */

};
export declare type Path = GraphQLResolveInfo['path'];
import type { DocumentNode, ExecutionArgs, ExecutionResult, GraphQLError, GraphQLResolveInfo, GraphQLSchema, ParseOptions, Source, SubscriptionArgs, ValidationRule } from 'graphql';
import { Maybe } from 'graphql/jsutils/Maybe';
import { PromiseOrValue } from 'graphql/jsutils/PromiseOrValue';
import { Maybe, PromiseOrValue } from './utils';
import { DefaultContext } from './context-types';
import { AsyncIterableIteratorOrValue, ExecuteFunction, ParseFunction, ValidateFunction, ValidateFunctionParameter } from '@envelop/core';
import { ExecuteFunction, ParseFunction, ValidateFunction, ValidateFunctionParameter } from '@envelop/core';
import { SubscribeFunction } from './graphql';

@@ -320,7 +319,7 @@ import { Plugin } from './plugin';

*/
result: AsyncIterableIteratorOrValue<ExecutionResult>;
result: AsyncIterableIterator<ExecutionResult> | ExecutionResult;
/**
* Replace the execution result with a new execution result.
*/
setResult: (newResult: AsyncIterableIteratorOrValue<ExecutionResult>) => void;
setResult: (newResult: AsyncIterableIterator<ExecutionResult> | ExecutionResult) => void;
};

@@ -327,0 +326,0 @@ /**

@@ -12,3 +12,5 @@ 'use strict';

function isAsyncIterable(maybeAsyncIterable) {
return typeof (maybeAsyncIterable === null || maybeAsyncIterable === void 0 ? void 0 : maybeAsyncIterable[Symbol.asyncIterator]) === 'function';
return (maybeAsyncIterable != null &&
typeof maybeAsyncIterable === 'object' &&
typeof maybeAsyncIterable[Symbol.asyncIterator] === 'function');
}

@@ -15,0 +17,0 @@ /**

{
"name": "@envelop/types",
"version": "1.2.0",
"version": "1.3.0-alpha-b257e50.0",
"sideEffects": false,
"peerDependencies": {
"graphql": "^14.0.0 || ^15.0.0"
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
},

@@ -8,0 +8,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc