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

gql-types-generator

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gql-types-generator - npm Package Compare versions

Comparing version 1.4.6 to 1.4.7

6

dist/compiler.js

@@ -176,5 +176,5 @@ "use strict";

if (node.kind === 'OperationDefinition') {
var name = node.name, operation = node.operation;
var ts = utils_1.generateOperation(utils_1.parseOperationDefinitionNode(node, schema, operations), schemaFileName, wrapWithTag);
acc.push({ operationName: name.value + utils_1.toCamelCase(operation), ts: ts });
var parsed = utils_1.parseOperationDefinitionNode(node, schema, operations);
var ts = utils_1.generateOperation(parsed, schemaFileName, wrapWithTag);
acc.push({ operationName: parsed.name, ts: ts });
}

@@ -181,0 +181,0 @@ return acc;

@@ -77,2 +77,9 @@ import { CompiledTypeName, GQLScalarType, DisplayType, GraphQLNonWrappedType, DefinitionWithImportTypes } from '../types';

/**
* Returns compiled operation namespace name
* @param {string} name
* @param {string} operation
* @returns {string}
*/
export declare function getCompiledOperationNamespaceName(name: string, operation: string): string;
/**
* Returns operation root node depending on operation type

@@ -79,0 +86,0 @@ * @param {GraphQLSchema} schema

@@ -206,6 +206,16 @@ "use strict";

function getCompiledOperationName(name, operation) {
return toCamelCase(name) + toCamelCase(operation);
return name + toCamelCase(operation);
}
exports.getCompiledOperationName = getCompiledOperationName;
/**
* Returns compiled operation namespace name
* @param {string} name
* @param {string} operation
* @returns {string}
*/
function getCompiledOperationNamespaceName(name, operation) {
return toCamelCase(name) + toCamelCase(operation);
}
exports.getCompiledOperationNamespaceName = getCompiledOperationNamespaceName;
/**
* Returns operation root node depending on operation type

@@ -212,0 +222,0 @@ * @param {GraphQLSchema} schema

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

var operationName = misc_1.getCompiledOperationName(name.value, operation);
var operationNamespaceName = misc_1.getCompiledOperationNamespaceName(name.value, operation);
var rootNode = misc_1.getOperationRootNode(schema, operation);

@@ -359,3 +360,3 @@ var importTypes = [];

name: operationName,
fields: selectionSetToObjectFields(selectionSet, operationName),
fields: selectionSetToObjectFields(selectionSet, operationNamespaceName),
};

@@ -366,3 +367,3 @@ // Arguments

// Namespace
var namespace = selectionSetToRootNamespace(selectionSet, operationName, args, rootNode);
var namespace = selectionSetToRootNamespace(selectionSet, operationNamespaceName, args, rootNode);
addImportTypes(namespace.importTypes);

@@ -369,0 +370,0 @@ return {

{
"name": "gql-types-generator",
"version": "1.4.6",
"version": "1.4.7",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "types": "dist/index.d.ts",

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