graphql-codegen-core
Advanced tools
Comparing version 0.6.0-alpha.1bc8b137 to 0.6.0-alpha.2bcde2b7
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var graphql_1 = require("graphql"); | ||
var object_map_to_array_1 = require("../utils/object-map-to-array"); | ||
@@ -11,2 +12,4 @@ var resolve_type_1 = require("./resolve-type"); | ||
var resolvedArguments = resolve_arguments_1.resolveArguments(item.value.args || []); | ||
var namedType = graphql_1.getNamedType(item.value.type); | ||
var isEnum = namedType['getValues']; | ||
return { | ||
@@ -20,2 +23,8 @@ name: item.value.name, | ||
hasArguments: resolvedArguments.length > 0, | ||
isType: namedType['getFields'] && namedType['getInterfaces'], | ||
isScalar: graphql_1.isLeafType(namedType) && !isEnum, | ||
isInterface: namedType['resolveType'] && namedType['getFields'], | ||
isUnion: namedType['resolveType'] && namedType['getTypes'], | ||
isInputType: namedType['getFields'] && !namedType['getInterfaces'], | ||
isEnum: isEnum, | ||
}; | ||
@@ -22,0 +31,0 @@ }); |
@@ -16,2 +16,8 @@ export interface Argument { | ||
hasArguments: boolean; | ||
isType: boolean; | ||
isScalar: boolean; | ||
isInterface: boolean; | ||
isUnion: boolean; | ||
isInputType: boolean; | ||
isEnum: boolean; | ||
} | ||
@@ -18,0 +24,0 @@ export interface Type { |
{ | ||
"name": "graphql-codegen-core", | ||
"version": "0.6.0-alpha.1bc8b137", | ||
"version": "0.6.0-alpha.2bcde2b7", | ||
"description": "GraphQL types and code generator based on schema", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
232938
690