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

graphql-auto-query

Package Overview
Dependencies
Maintainers
0
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-auto-query - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

8

dist/cjs/index.js

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

const name = upperFirst(field.name);
const newArgsMap = { ...argsMap };
const fieldOutput = `${createSpaces((level + 1) * 2)}${field.name}${field.args.length

@@ -135,4 +136,4 @@ ? [

: arg.name;
const genName = this.generateArgsName(argsMap, argName);
argsMap[genName] = arg.type.toString();
const genName = this.generateArgsName(newArgsMap, argName);
newArgsMap[genName] = arg.type.toString();
return `${createSpaces((level + 2) * 2)}${arg.name}: $${genName}`;

@@ -145,3 +146,3 @@ })

const childOutput = fields
.map((field) => this.createOutputFields(field, argsMap, maxLevel, level + 1))
.map((field) => this.createOutputFields(field, newArgsMap, maxLevel, level + 1))
.filter((v) => v)

@@ -155,2 +156,3 @@ .join("\n");

return "";
Object.assign(argsMap, newArgsMap);
return [fieldOutput, fragmentOutput, childOutput, closingOutput]

@@ -157,0 +159,0 @@ .filter((v) => v)

@@ -123,2 +123,3 @@ /* eslint-disable @typescript-eslint/no-explicit-any */

const name = upperFirst(field.name);
const newArgsMap = { ...argsMap };
const fieldOutput = `${createSpaces((level + 1) * 2)}${field.name}${field.args.length

@@ -132,4 +133,4 @@ ? [

: arg.name;
const genName = this.generateArgsName(argsMap, argName);
argsMap[genName] = arg.type.toString();
const genName = this.generateArgsName(newArgsMap, argName);
newArgsMap[genName] = arg.type.toString();
return `${createSpaces((level + 2) * 2)}${arg.name}: $${genName}`;

@@ -142,3 +143,3 @@ })

const childOutput = fields
.map((field) => this.createOutputFields(field, argsMap, maxLevel, level + 1))
.map((field) => this.createOutputFields(field, newArgsMap, maxLevel, level + 1))
.filter((v) => v)

@@ -152,2 +153,3 @@ .join("\n");

return "";
Object.assign(argsMap, newArgsMap);
return [fieldOutput, fragmentOutput, childOutput, closingOutput]

@@ -154,0 +156,0 @@ .filter((v) => v)

{
"name": "graphql-auto-query",
"version": "1.0.3",
"version": "1.0.4",
"author": "SoraKumo <info@croud.jp>",

@@ -5,0 +5,0 @@ "description": "Automatic generation of GraphQL queries from GraphQL schemas",

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