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

@elba-security/graphql-zeus

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elba-security/graphql-zeus - npm Package Compare versions

Comparing version 5.1.9-alpha.1 to 6.0.0-alpha.0

lib/TreeToTS/templates/shared/enums.d.ts

3

lib/TreeToTS/templates/modelTypes/index.js

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

const graphql_js_tree_1 = require("graphql-js-tree");
const enums_1 = require("../shared/enums");
exports.MODEL_TYPES = 'ModelTypes';

@@ -14,3 +15,3 @@ const resolveTypeFromRoot = (i, rootNodes) => {

if (i.data.type === graphql_js_tree_1.TypeDefinition.EnumTypeDefinition) {
return `["${i.name}"]:${i.name}`;
return `["${i.name}"]:${(0, enums_1.toTypeNameFromEnum)(i.name)}`;
}

@@ -17,0 +18,0 @@ if (i.data.type === graphql_js_tree_1.TypeDefinition.ScalarTypeDefinition) {

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

const description_1 = require("../shared/description");
const enums_1 = require("../shared/enums");
const resolveEnum = (i) => {

@@ -10,7 +11,7 @@ if (!i.args) {

}
return `${(0, description_1.plusDescription)(i.description)}export const enum ${i.name} {\n${i.args
.map((f) => `\t${f.name} = "${f.name}"`)
.join(',\n')}\n}`;
const typeName = (0, enums_1.toTypeNameFromEnum)(i.name);
const stringLiterals = i.args.map((f) => `'${f.name}'`).join(' | ');
return `${(0, description_1.plusDescription)(i.description)}export type ${typeName} = ${stringLiterals}\n`;
};
exports.resolveEnum = resolveEnum;
//# sourceMappingURL=enum.js.map

@@ -10,6 +10,7 @@ "use strict";

const graphql_js_tree_1 = require("graphql-js-tree");
const enums_1 = require("../shared/enums");
const resolveType = ({ data, name, args }, rootNodes) => {
switch (data.type) {
case graphql_js_tree_1.TypeDefinition.EnumTypeDefinition:
return `["${name}"]: ${name}`;
return `["${name}"]: ${(0, enums_1.toTypeNameFromEnum)(name)}`;
case graphql_js_tree_1.TypeDefinition.InputObjectTypeDefinition:

@@ -16,0 +17,0 @@ return `["${name}"]: {\n\t${args.map((f) => (0, field_1.resolveField)(f)).join(',\n')}\n}`;

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

const isNullType = (type) => {
return f.type.fieldType.type === graphql_js_tree_1.Options.required || type.endsWith(' | null') ? `: ${type}` : `: ${type} | null`;
return f.type.fieldType.type === graphql_js_tree_1.Options.required ? `: ${type}` : `: ${type}`;
};

@@ -26,0 +26,0 @@ return `${(0, description_1.plusDescription)(f.description, '\t')}\t${f.name}${isNullType((0, exports.resolveFieldType)((0, primitive_1.toTypeScriptPrimitive)((0, graphql_js_tree_1.getTypeName)(f.type.fieldType), t), f.type.fieldType))}`;

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

const models_1 = require("./models");
const enums_1 = require("../shared/enums");
const AliasType = (code) => `AliasType<${code}>`;

@@ -21,3 +22,3 @@ const resolveValueTypeFromRoot = (i, rootNodes, enumsAndScalars) => {

if (i.data.type === graphql_js_tree_1.TypeDefinition.EnumTypeDefinition) {
return `["${i.name}"]:${i.name}`;
return `["${i.name}"]:${(0, enums_1.toTypeNameFromEnum)(i.name)}`;
}

@@ -24,0 +25,0 @@ if (i.data.type === graphql_js_tree_1.TypeDefinition.InputObjectTypeDefinition) {

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

const models_1 = require("../models");
const enums_1 = require("../../shared/enums");
const AliasType = (code) => `AliasType<${code}>`;

@@ -16,3 +17,3 @@ const resolveValueTypeFromRoot = (i, rootNodes, enumsAndScalars) => {

if (i.data.type === graphql_js_tree_1.TypeDefinition.EnumTypeDefinition) {
return `["${i.name}"]:${i.name}`;
return `["${i.name}"]:${(0, enums_1.toTypeNameFromEnum)(i.name)}`;
}

@@ -19,0 +20,0 @@ if (i.data.type === graphql_js_tree_1.TypeDefinition.InputObjectTypeDefinition) {

{
"name": "@elba-security/graphql-zeus",
"version": "5.1.9-alpha.1",
"version": "6.0.0-alpha.0",
"private": false,

@@ -18,3 +18,2 @@ "license": "MIT",

"cli": "node ./lib/CLI/index.js",
"prepublishOnly": "yarn && yarn build",
"examples-generate": "npm run generate-typescript-node",

@@ -21,0 +20,0 @@ "generate-typescript-node": "node ./lib/CLI/index.js https://faker.graphqleditor.com/a-team/olympus/graphql examples/typescript-node/src --n -g examples/typescript-node/zeus.graphql --apollo --reactQuery --stuccoSubscriptions --td",

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

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