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

@croquiscom/crary-graphql

Package Overview
Dependencies
Maintainers
5
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@croquiscom/crary-graphql - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

4

lib/info/getFieldList.d.ts
import { GraphQLResolveInfo } from 'graphql';
export declare function getFieldList(info: GraphQLResolveInfo, fieldName?: string): string[];
export declare function getFieldList1st(info: GraphQLResolveInfo, fieldName?: string): string[];
export declare function getFieldList(info: GraphQLResolveInfo, field_path?: string | string[]): string[];
export declare function getFieldList1st(info: GraphQLResolveInfo, field_path?: string | string[]): string[];

@@ -66,22 +66,25 @@ "use strict";

}
function getFieldList(info, fieldName) {
if (fieldName) {
const node = getSubFieldNode(info, info.fieldNodes, fieldName);
if (node) {
return Object.keys(getFieldSet(info, [node], '', 99999));
function getFieldListByDepth(info, field_path, depth) {
if (typeof field_path === 'string') {
field_path = [field_path];
}
let nodes = info.fieldNodes;
if (field_path.length > 0) {
const field_node = field_path.slice(1).reduce((node, field_name) => node && getSubFieldNode(info, [node], field_name), getSubFieldNode(info, nodes, field_path[0]));
if (field_node) {
nodes = [field_node];
}
return [];
else {
return [];
}
}
else {
return Object.keys(getFieldSet(info, info.fieldNodes, '', 99999));
}
return Object.keys(getFieldSet(info, nodes, '', depth));
}
function getFieldList(info, field_path = []) {
return getFieldListByDepth(info, field_path, 99999);
}
exports.getFieldList = getFieldList;
function getFieldList1st(info, fieldName) {
if (fieldName) {
const node = getSubFieldNode(info, info.fieldNodes, fieldName);
return node ? Object.keys(getFieldSet(info, [node], '', 1)) : [];
}
return Object.keys(getFieldSet(info, info.fieldNodes, '', 1));
function getFieldList1st(info, field_path = []) {
return getFieldListByDepth(info, field_path, 1);
}
exports.getFieldList1st = getFieldList1st;
{
"name": "@croquiscom/crary-graphql",
"version": "0.4.0",
"version": "0.5.0",
"description": "Croquis's library - graphql extension",

@@ -40,3 +40,3 @@ "main": "./lib",

},
"gitHead": "00bff9c39ab6ce8dce2c7e55d41ea29586f743d2"
"gitHead": "186afdc904505d5877aef4eb59389e015273374f"
}
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