apollo-codegen
Advanced tools
Comparing version 0.16.0 to 0.16.1
@@ -127,4 +127,4 @@ "use strict"; | ||
generator.printNewlineIfNeeded(); | ||
generator.printOnNewline('public static let selections: [Selection] = '); | ||
selectionSetInitialization(generator, fields, inlineFragments, structName); | ||
generator.printOnNewline('public static let selections: [GraphQLSelection] = '); | ||
selectionSetInitialization(generator, fields, inlineFragments); | ||
generator.printNewlineIfNeeded(); | ||
@@ -372,3 +372,3 @@ language_1.propertyDeclaration(generator, { propertyName: "snapshot", typeName: "Snapshot" }); | ||
} | ||
function selectionSetInitialization(generator, fields, inlineFragments, parentStructName) { | ||
function selectionSetInitialization(generator, fields, inlineFragments) { | ||
generator.print('['); | ||
@@ -378,4 +378,4 @@ generator.withIndent(() => { | ||
const { responseName, fieldName, args, type } = field; | ||
const structName = printing_1.join([parentStructName, naming_1.structNameForPropertyName(responseName)], '.'); | ||
generator.printOnNewline(`Field(`); | ||
const structName = naming_1.structNameForPropertyName(responseName); | ||
generator.printOnNewline(`GraphQLField(`); | ||
generator.print(printing_1.join([ | ||
@@ -390,4 +390,4 @@ `"${fieldName}"`, | ||
inlineFragments && inlineFragments.forEach(InlineFragment => { | ||
const structName = printing_1.join([parentStructName, naming_1.structNameForInlineFragment(InlineFragment)], '.'); | ||
generator.printOnNewline(`FragmentSpread(${structName}.self),`); | ||
const structName = naming_1.structNameForInlineFragment(InlineFragment); | ||
generator.printOnNewline(`GraphQLFragmentSpread(${structName}.self),`); | ||
}); | ||
@@ -394,0 +394,0 @@ }); |
{ | ||
"name": "apollo-codegen", | ||
"version": "0.16.0", | ||
"version": "0.16.1", | ||
"description": "Generate API code or type annotations based on a GraphQL schema and query documents", | ||
@@ -28,2 +28,3 @@ "main": "./lib/index.js", | ||
"@types/inflected": "^1.1.29", | ||
"@types/jest": "^20.0.5", | ||
"@types/lodash": "^4.14.71", | ||
@@ -30,0 +31,0 @@ "@types/mkdirp": "^0.5.0", |
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
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
222289
13