apollo-codegen
Advanced tools
Comparing version 0.17.0-alpha.7 to 0.17.0-alpha.8
@@ -42,7 +42,6 @@ "use strict"; | ||
} | ||
generator.printOnNewline(`export type ${name} =`); | ||
const nValues = values.length; | ||
values.forEach((value, i) => { | ||
generator.printOnNewline(`export enum ${name} {`); | ||
values.forEach((value) => { | ||
if (!value.description || value.description.indexOf('\n') === -1) { | ||
generator.printOnNewline(` "${value.value}"${i === nValues - 1 ? ';' : ' |'}${printing_1.wrap(' // ', value.description)}`); | ||
generator.printOnNewline(` ${value.value} = "${value.value}",${printing_1.wrap(' // ', value.description)}`); | ||
} | ||
@@ -56,5 +55,6 @@ else { | ||
} | ||
generator.printOnNewline(` "${value.value}"${i === nValues - 1 ? ';' : ' |'}`); | ||
generator.printOnNewline(` ${value.value} = "${value.value}",`); | ||
} | ||
}); | ||
generator.printOnNewline(`}`); | ||
generator.printNewline(); | ||
@@ -61,0 +61,0 @@ } |
{ | ||
"name": "apollo-codegen", | ||
"version": "0.17.0-alpha.7", | ||
"version": "0.17.0-alpha.8", | ||
"description": "Generate API code or type annotations based on a GraphQL schema and query documents", | ||
@@ -37,2 +37,3 @@ "main": "./lib/index.js", | ||
"jest-matcher-utils": "^21.1.0", | ||
"ts-jest": "^21.0.1", | ||
"typescript": "^2.5.2" | ||
@@ -68,3 +69,3 @@ }, | ||
"transform": { | ||
".(js|ts)": "<rootDir>/test/test-utils/preprocessor.js" | ||
"^.+\\.(ts|js)x?$": "<rootDir>/node_modules/ts-jest/preprocessor.js" | ||
}, | ||
@@ -71,0 +72,0 @@ "moduleFileExtensions": [ |
@@ -76,7 +76,6 @@ import { LegacyCompilerContext, LegacyInlineFragment, LegacyFragment, LegacyField, LegacyOperation } from '../compiler/legacyIR'; | ||
} | ||
generator.printOnNewline(`export type ${name} =`); | ||
const nValues = values.length; | ||
values.forEach((value, i) => { | ||
generator.printOnNewline(`export enum ${name} {`); | ||
values.forEach((value) => { | ||
if (!value.description || value.description.indexOf('\n') === -1) { | ||
generator.printOnNewline(` "${value.value}"${i === nValues - 1 ? ';' : ' |'}${wrap(' // ', value.description)}`) | ||
generator.printOnNewline(` ${value.value} = "${value.value}",${wrap(' // ', value.description)}`) | ||
} else { | ||
@@ -89,5 +88,6 @@ if (value.description) { | ||
} | ||
generator.printOnNewline(` "${value.value}"${i === nValues - 1 ? ';' : ' |'}`) | ||
generator.printOnNewline(` ${value.value} = "${value.value}",`) | ||
} | ||
}); | ||
generator.printOnNewline(`}`); | ||
generator.printNewline(); | ||
@@ -94,0 +94,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
443456
14