@gql2ts/util
Advanced tools
Comparing version 1.7.2 to 1.8.0-alpha.8bb7d8dc
export { readFile, writeToFile, safeJSONParse } from './fileIO'; | ||
export { PossibleIntrospectionInputs, PossibleSchemaInput, isIntrospectionResult, schemaFromInputs, isList, isNonNullable, isEnum } from './schema'; | ||
export { PossibleIntrospectionInputs, PossibleSchemaInput, isIntrospectionResult, schemaFromInputs, isList, isNonNullable, isEnum, isScalar, isUnion } from './schema'; | ||
export { getDocTags, IJSDocTag, buildDocumentation, IFieldDocumentation } from './parser'; | ||
export { filterAndJoinArray } from './util'; |
@@ -13,2 +13,4 @@ "use strict"; | ||
exports.isEnum = schema_1.isEnum; | ||
exports.isScalar = schema_1.isScalar; | ||
exports.isUnion = schema_1.isUnion; | ||
var parser_1 = require("./parser"); | ||
@@ -15,0 +17,0 @@ exports.getDocTags = parser_1.getDocTags; |
@@ -1,2 +0,2 @@ | ||
import { IntrospectionQuery, GraphQLSchema, GraphQLType, GraphQLNonNull, GraphQLList, GraphQLEnumType } from 'graphql'; | ||
import { IntrospectionQuery, GraphQLSchema, GraphQLType, GraphQLNonNull, GraphQLList, GraphQLEnumType, GraphQLNamedType, GraphQLUnionType, GraphQLScalarType } from 'graphql'; | ||
export declare type PossibleIntrospectionInputs = { | ||
@@ -11,1 +11,3 @@ data: IntrospectionQuery; | ||
export declare function isEnum(type: GraphQLType): type is GraphQLEnumType; | ||
export declare function isUnion(type: GraphQLNamedType): type is GraphQLUnionType; | ||
export declare function isScalar(type: any): type is GraphQLScalarType; |
@@ -37,2 +37,10 @@ "use strict"; | ||
exports.isEnum = isEnum; | ||
function isUnion(type) { | ||
return type instanceof graphql_1.GraphQLUnionType; | ||
} | ||
exports.isUnion = isUnion; | ||
function isScalar(type) { | ||
return type instanceof graphql_1.GraphQLScalarType || !!type._scalarConfig; | ||
} | ||
exports.isScalar = isScalar; | ||
//# sourceMappingURL=schema.js.map |
{ | ||
"name": "@gql2ts/util", | ||
"private": false, | ||
"version": "1.7.2", | ||
"version": "1.8.0-alpha.8bb7d8dc", | ||
"description": "utilities for gql2ts", | ||
@@ -6,0 +6,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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
10997
160
1