Socket
Socket
Sign inDemoInstall

@n1ru4l/in-memory-live-query-store

Package Overview
Dependencies
5
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.0-alpha-e2bf954.0 to 0.8.0

12

esm/index.js
import { visit, visitWithTypeInfo, isNonNullType, isScalarType, execute, getOperationAST, GraphQLError, defaultFieldResolver, TypeInfo } from 'graphql';
import { mapSchema, MapperKind } from '@graphql-tools/utils';
import { makePushPullAsyncIterableIterator } from '@n1ru4l/push-pull-async-iterable-iterator';
import { makePushPullAsyncIterableIterator, isAsyncIterable } from '@n1ru4l/push-pull-async-iterable-iterator';
import { getLiveDirectiveNode, getLiveDirectiveArgumentValues } from '@n1ru4l/graphql-live-query';

@@ -299,2 +299,3 @@ import { getArgumentValues } from 'graphql/execution/values.js';

...additionalArguments,
// TODO: remove this type-cast once GraphQL.js 16-defer-stream with fixed return type got released
});

@@ -304,4 +305,4 @@ // result cannot be a AsyncIterableIterator if the `NoLiveMixedWithDeferStreamRule` was used.

const handleAsyncIterator = (iterator) => {
var _a, _b;
(_b = (_a = iterator[Symbol.asyncIterator]()).return) === null || _b === void 0 ? void 0 : _b.call(_a);
var _a;
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
record.pushValue({

@@ -319,7 +320,2 @@ errors: [

};
const isAsyncIterable = (value) => {
return (typeof value === "object" &&
value !== null &&
Symbol.asyncIterator in value);
};
runWith(result, (result) => {

@@ -326,0 +322,0 @@ if (isAsyncIterable(result)) {

@@ -303,2 +303,3 @@ 'use strict';

...additionalArguments,
// TODO: remove this type-cast once GraphQL.js 16-defer-stream with fixed return type got released
});

@@ -308,4 +309,4 @@ // result cannot be a AsyncIterableIterator if the `NoLiveMixedWithDeferStreamRule` was used.

const handleAsyncIterator = (iterator) => {
var _a, _b;
(_b = (_a = iterator[Symbol.asyncIterator]()).return) === null || _b === void 0 ? void 0 : _b.call(_a);
var _a;
(_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
record.pushValue({

@@ -323,9 +324,4 @@ errors: [

};
const isAsyncIterable = (value) => {
return (typeof value === "object" &&
value !== null &&
Symbol.asyncIterator in value);
};
runWith(result, (result) => {
if (isAsyncIterable(result)) {
if (pushPullAsyncIterableIterator.isAsyncIterable(result)) {
handleAsyncIterator(result);

@@ -332,0 +328,0 @@ return;

{
"name": "@n1ru4l/in-memory-live-query-store",
"version": "0.8.0-alpha-e2bf954.0",
"version": "0.8.0",
"peerDependencies": {

@@ -9,3 +9,3 @@ "graphql": "^15.4.0 || ^16.0.0"

"@graphql-tools/utils": "^8.5.2",
"@n1ru4l/graphql-live-query": "0.9.0-alpha-e2bf954.0",
"@n1ru4l/graphql-live-query": "0.9.0",
"@n1ru4l/push-pull-async-iterable-iterator": "^3.0.0"

@@ -12,0 +12,0 @@ },

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc