Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphitation/supermassive

Package Overview
Dependencies
Maintainers
0
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphitation/supermassive - npm Package Compare versions

Comparing version 3.6.2 to 3.6.3

4

CHANGELOG.md
# Change Log - @graphitation/supermassive
<!-- This log was last generated on Thu, 24 Oct 2024 13:14:46 GMT and should not be manually modified. -->
<!-- This log was last generated on Thu, 24 Oct 2024 13:15:11 GMT and should not be manually modified. -->

@@ -9,3 +9,3 @@ <!-- Start content -->

Thu, 24 Oct 2024 13:14:46 GMT
Thu, 24 Oct 2024 13:15:11 GMT

@@ -12,0 +12,0 @@ ### Patches

@@ -106,3 +106,3 @@ "use strict";

} else {
return executeOperation(exeContext);
return executeOperationWithBeforeHook(exeContext);
}

@@ -199,2 +199,13 @@ }

}
function executeOperationWithBeforeHook(exeContext) {
const hooks = exeContext.fieldExecutionHooks;
let hook;
if (hooks == null ? void 0 : hooks.beforeOperationExecute) {
hook = invokeBeforeOperationExecuteHook(exeContext);
}
if ((0, import_isPromise.isPromise)(hook)) {
return hook.then(() => executeOperation(exeContext));
}
return executeOperation(exeContext);
}
function executeOperation(exeContext) {

@@ -210,6 +221,2 @@ try {

let result;
const hooks = exeContext.fieldExecutionHooks;
if (hooks == null ? void 0 : hooks.beforeOperationExecute) {
invokeBeforeOperationExecuteHook(exeContext);
}
switch (operation.operation) {

@@ -482,3 +489,6 @@ case "query":

}
const result = resolveFn(rootValue, args, contextValue, info);
const result = (0, import_isPromise.isPromise)(hookContext) ? hookContext.then((context) => {
hookContext = context;
return resolveFn(rootValue, args, contextValue, info);
}) : resolveFn(rootValue, args, contextValue, info);
if ((0, import_isPromise.isPromise)(result)) {

@@ -567,7 +577,20 @@ return result.then(assertEventStream).then(

const hooks = exeContext == null ? void 0 : exeContext.fieldExecutionHooks;
let beforeExecuteFieldsHook;
if (hooks == null ? void 0 : hooks.beforeSubscriptionEventEmit) {
invokeBeforeSubscriptionEventEmitHook(perEventContext, payload);
beforeExecuteFieldsHook = invokeBeforeSubscriptionEventEmitHook(
perEventContext,
payload
);
}
try {
const data = executeFields(
const data = (0, import_isPromise.isPromise)(beforeExecuteFieldsHook) ? beforeExecuteFieldsHook.then(
() => executeFields(
exeContext,
parentTypeName,
payload,
path,
groupedFieldSet,
void 0
)
) : executeFields(
exeContext,

@@ -638,3 +661,6 @@ parentTypeName,

}
const result = resolveFn(source, args, contextValue, info);
const result = (0, import_isPromise.isPromise)(hookContext) ? hookContext.then((context) => {
hookContext = context;
return resolveFn(source, args, contextValue, info);
}) : resolveFn(source, args, contextValue, info);
let completed;

@@ -1380,5 +1406,16 @@ if ((0, import_isPromise.isPromise)(result)) {

} finally {
onComplete(result, error);
if (!(0, import_isPromise.isPromise)(result)) {
onComplete(result, error);
}
}
return result;
if (!(0, import_isPromise.isPromise)(result)) {
return result;
}
return result.then((hookResult) => {
onComplete(hookResult, error);
return hookResult;
}).catch((e) => {
onComplete(void 0, e);
return void 0;
});
}

@@ -1385,0 +1422,0 @@ function toGraphQLError(originalError, path, prependMessage) {

@@ -30,3 +30,3 @@ import type { OperationDefinitionNode } from "graphql";

export interface BeforeFieldResolveHook<ResolveContext = unknown, BeforeHookContext = unknown> {
(args: BaseExecuteFieldHookArgs<ResolveContext>): BeforeHookContext;
(args: BaseExecuteFieldHookArgs<ResolveContext>): Promise<BeforeHookContext> | BeforeHookContext;
}

@@ -43,6 +43,6 @@ export interface AfterFieldResolveHook<ResolveContext = unknown, BeforeHookContext = unknown, AfterHookContext = BeforeHookContext> {

export interface BeforeOperationExecuteHook<ResolveContext = unknown> {
(args: BaseExecuteOperationHookArgs<ResolveContext>): void;
(args: BaseExecuteOperationHookArgs<ResolveContext>): void | Promise<void>;
}
export interface BeforeSubscriptionEventEmitHook<ResolveContext = unknown> {
(args: BeforeSubscriptionEventEmitHookArgs<ResolveContext>): void;
(args: BeforeSubscriptionEventEmitHookArgs<ResolveContext>): void | Promise<void>;
}

@@ -49,0 +49,0 @@ export interface ExecutionHooks<ResolveContext = unknown, BeforeHookContext = unknown, AfterHookContext = BeforeHookContext> {

{
"name": "@graphitation/supermassive",
"license": "MIT",
"version": "3.6.2",
"version": "3.6.3",
"main": "./lib/index",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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