apollo-codegen
Advanced tools
Comparing version 0.10.0 to 0.10.1
@@ -186,2 +186,3 @@ 'use strict'; | ||
var filePath = (0, _graphql2.filePathForNode)(operationDefinition); | ||
var operationName = operationDefinition.name.value; | ||
@@ -212,3 +213,3 @@ var operationType = operationDefinition.operation; | ||
return { operationName: operationName, operationType: operationType, variables: variables, source: source, fields: fields, fragmentsReferenced: fragmentsReferenced }; | ||
return { filePath: filePath, operationName: operationName, operationType: operationType, variables: variables, source: source, fields: fields, fragmentsReferenced: fragmentsReferenced }; | ||
} | ||
@@ -218,2 +219,3 @@ }, { | ||
value: function compileFragment(fragmentDefinition) { | ||
var filePath = (0, _graphql2.filePathForNode)(fragmentDefinition); | ||
var fragmentName = fragmentDefinition.name.value; | ||
@@ -238,3 +240,3 @@ | ||
return { fragmentName: fragmentName, source: source, typeCondition: typeCondition, fields: fields, fragmentSpreads: fragmentSpreads, inlineFragments: inlineFragments, fragmentsReferenced: fragmentsReferenced }; | ||
return { filePath: filePath, fragmentName: fragmentName, source: source, typeCondition: typeCondition, fields: fields, fragmentSpreads: fragmentSpreads, inlineFragments: inlineFragments, fragmentsReferenced: fragmentsReferenced }; | ||
} | ||
@@ -241,0 +243,0 @@ }, { |
@@ -32,5 +32,3 @@ 'use strict'; | ||
return (0, _stringify2.default)(ast, function (key, value) { | ||
if (value === undefined) { | ||
return null; | ||
} else if ((0, _graphql.isType)(value)) { | ||
if ((0, _graphql.isType)(value)) { | ||
if (expandTypes) { | ||
@@ -37,0 +35,0 @@ return serializeType(value); |
@@ -6,2 +6,4 @@ 'use strict'; | ||
}); | ||
exports.sourceAt = sourceAt; | ||
exports.filePathForNode = filePathForNode; | ||
exports.valueFromValueNode = valueFromValueNode; | ||
@@ -14,2 +16,11 @@ exports.isTypeProperSuperTypeOf = isTypeProperSuperTypeOf; | ||
function sourceAt(location) { | ||
return location.source.body.slice(location.start, location.end); | ||
} | ||
function filePathForNode(node) { | ||
var name = node.loc.source && node.loc.source.name; | ||
return name === "GraphQL" ? undefined : name; | ||
} | ||
function valueFromValueNode(valueNode) { | ||
@@ -16,0 +27,0 @@ var kind = valueNode.kind; |
{ | ||
"name": "apollo-codegen", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "Generate API code or type annotations based on a GraphQL schema and query documents", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
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
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
432208
8232