🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@cortexql/ts2graphql

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cortexql/ts2graphql - npm Package Compare versions

Comparing version

to
0.0.72

2

package.json
{
"name": "@cortexql/ts2graphql",
"version": "0.0.71",
"version": "0.0.72",
"description": "A TypeScrpt transpiler to GraphQL for your project",

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

@@ -221,2 +221,29 @@ "use strict";

}
/*
* Handles Enumeration when not implicit specified
*/
let enumType;
let isEnum = true;
for (const item of types) {
if (item.type !== 'reference') {
isEnum = false;
break;
}
const type = this.getTypeDoc().get(types[0].id);
if (type.kindString !== 'Enumeration member') {
isEnum = false;
break;
}
const parent = this.getTypeDoc().getParent(type.id);
if (parent == null || (enumType != null && parent !== enumType)) {
isEnum = false;
break;
}
if (enumType == null) {
enumType = parent;
}
}
if (isEnum && enumType != null) {
return this.resolveType(enumType);
}
throw this.relativeError('Union types must be an exported named type on its own file', ref);

@@ -223,0 +250,0 @@ }

Sorry, the diff of this file is not supported yet