UNPKG

@graphql-codegen/c-sharp-common

Version:
17 lines (16 loc) 544 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CSharpFieldType = void 0; class CSharpFieldType { constructor(fieldType) { Object.assign(this, fieldType); } get innerTypeName() { const nullable = this.baseType.valueType && !this.baseType.required ? '?' : ''; return `${this.baseType.type}${nullable}`; } get isOuterTypeRequired() { return this.listType ? this.listType.required : this.baseType.required; } } exports.CSharpFieldType = CSharpFieldType;