UNPKG

jok

Version:

Bundle of utility functions for code generation related to nodejs and graphql

11 lines (10 loc) 614 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function default_1(fragmentName, hasResultType, skipMergingOptions) { if (skipMergingOptions === void 0) { skipMergingOptions = false; } var fragmentNameSection = hasResultType ? "\n\t\tconst fragmentName = mergedOptions.fragmentName || getFirstFragmentName(fragment) || '" + fragmentName + "'" : ''; return "\n\t\tconst mergedOptions = {\n\t\t\t...<any>this.defaultOptions,\n\t\t\t" + (skipMergingOptions ? '' : '...options,') + "\n\t\t}\n\n\t\t" + fragmentNameSection + "\n"; } exports.default = default_1;