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

@envelop/generic-auth

Package Overview
Dependencies
Maintainers
1
Versions
1325
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@envelop/generic-auth - npm Package Compare versions

Comparing version 8.0.0 to 8.0.1-alpha-20241211101407-78d40a8bc4c78d160a9672d90b9f0715fac8f6bb

17

cjs/index.js

@@ -126,2 +126,14 @@ "use strict";

const user = args.contextValue[contextFieldName];
const schema = context.getSchema();
const operationAST = (0, graphql_1.getOperationAST)(args.document, args.operationName);
const variableDefinitions = operationAST?.variableDefinitions;
let variableValues;
if (variableDefinitions?.length) {
const { coerced } = (0, graphql_1.getVariableValues)(schema, variableDefinitions, args.variableValues || {});
variableValues = coerced;
}
else {
variableValues = args.variableValues;
}
const operationType = operationAST?.operation ?? 'query';
const handleField = ({ node: fieldNode, path, }, parentType) => {

@@ -133,3 +145,2 @@ const field = parentType.getFields()[fieldNode.name.value];

}
const schema = context.getSchema();
// @ts-expect-error - Fix this

@@ -148,4 +159,2 @@ const typeDirectives = parentType && (0, utils_1.getDirectiveExtensions)(parentType, schema);

let curr = args.document;
const operationAST = (0, graphql_1.getOperationAST)(args.document, args.operationName);
const operationType = operationAST?.operation ?? 'query';
let currType = (0, utils_1.getDefinedRootType)(schema, operationType);

@@ -199,3 +208,3 @@ for (const pathItem of path) {

Field(node, key, parent, path, ancestors) {
if (!(0, utils_1.shouldIncludeNode)(args.variableValues, node)) {
if (variableValues && !(0, utils_1.shouldIncludeNode)(variableValues, node)) {
return;

@@ -202,0 +211,0 @@ }

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

import { getNamedType, getOperationAST, isAbstractType, isInterfaceType, isIntrospectionType, isListType, isObjectType, isUnionType, } from 'graphql';
import { getNamedType, getOperationAST, getVariableValues, isAbstractType, isInterfaceType, isIntrospectionType, isListType, isObjectType, isUnionType, } from 'graphql';
import { useExtendedValidation } from '@envelop/extended-validation';

@@ -119,2 +119,14 @@ import { createGraphQLError, getDefinedRootType, getDirectiveExtensions, shouldIncludeNode, } from '@graphql-tools/utils';

const user = args.contextValue[contextFieldName];
const schema = context.getSchema();
const operationAST = getOperationAST(args.document, args.operationName);
const variableDefinitions = operationAST?.variableDefinitions;
let variableValues;
if (variableDefinitions?.length) {
const { coerced } = getVariableValues(schema, variableDefinitions, args.variableValues || {});
variableValues = coerced;
}
else {
variableValues = args.variableValues;
}
const operationType = operationAST?.operation ?? 'query';
const handleField = ({ node: fieldNode, path, }, parentType) => {

@@ -126,3 +138,2 @@ const field = parentType.getFields()[fieldNode.name.value];

}
const schema = context.getSchema();
// @ts-expect-error - Fix this

@@ -141,4 +152,2 @@ const typeDirectives = parentType && getDirectiveExtensions(parentType, schema);

let curr = args.document;
const operationAST = getOperationAST(args.document, args.operationName);
const operationType = operationAST?.operation ?? 'query';
let currType = getDefinedRootType(schema, operationType);

@@ -192,3 +201,3 @@ for (const pathItem of path) {

Field(node, key, parent, path, ancestors) {
if (!shouldIncludeNode(args.variableValues, node)) {
if (variableValues && !shouldIncludeNode(variableValues, node)) {
return;

@@ -195,0 +204,0 @@ }

{
"name": "@envelop/generic-auth",
"version": "8.0.0",
"version": "8.0.1-alpha-20241211101407-78d40a8bc4c78d160a9672d90b9f0715fac8f6bb",
"sideEffects": false,

@@ -5,0 +5,0 @@ "peerDependencies": {

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