gql-types-generator
Advanced tools
Comparing version 1.2.29 to 1.2.30
@@ -52,8 +52,2 @@ import { CompiledTypeName, GQLScalarType, DisplayType, GraphQLNonWrappedType, DefinitionWithRequiredTypes } from '../types'; | ||
/** | ||
* Returns OutputType description | ||
* @param {GraphQLOutputType} type | ||
* @returns {string | null} | ||
*/ | ||
export declare function getOutputTypeDescription(type: GraphQLOutputType): string | null; | ||
/** | ||
* Returns sorter depending on display type | ||
@@ -60,0 +54,0 @@ * @param {DisplayType} display |
@@ -91,3 +91,3 @@ "use strict"; | ||
}); | ||
definition = "Array<" + _definition + ">"; | ||
definition = _definition + "[]"; | ||
} | ||
@@ -114,3 +114,3 @@ if (nullable) { | ||
if (graphql_1.isListType(type)) { | ||
definition = "Array<" + getOutputTypeDefinition(type.ofType) + ">"; | ||
definition = getOutputTypeDefinition(type.ofType) + "[]"; | ||
} | ||
@@ -145,3 +145,3 @@ else if (graphql_1.isScalarType(type)) { | ||
if (graphql_1.isListType(type)) { | ||
def = "Array<" + def + ">"; | ||
def = def + "[]"; | ||
} | ||
@@ -152,14 +152,2 @@ return nullable ? makeNullable(def) : def; | ||
/** | ||
* Returns OutputType description | ||
* @param {GraphQLOutputType} type | ||
* @returns {string | null} | ||
*/ | ||
function getOutputTypeDescription(type) { | ||
if (graphql_1.isNonNullType(type) || graphql_1.isListType(type)) { | ||
return getOutputTypeDescription(type.ofType); | ||
} | ||
return type.description || null; | ||
} | ||
exports.getOutputTypeDescription = getOutputTypeDescription; | ||
/** | ||
* Returns sorter depending on display type | ||
@@ -166,0 +154,0 @@ * @param {DisplayType} display |
{ | ||
"name": "gql-types-generator", | ||
"version": "1.2.29", | ||
"version": "1.2.30", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
72700
1565