graphql-tag
Advanced tools
Comparing version 2.8.0 to 2.9.0
# Change log | ||
### v2.7.0 | ||
### v2.9.0 | ||
* Remove duplicate exports in named exports by [wacii](https://github.com/wacii) in [#170](https://github.com/apollographql/graphql-tag/pull/170) | ||
* Update `graphql` to ^0.13, support testing all compatible versions [jnwng](https://github.com/jnwng) in | ||
### v2.8.0 | ||
* Update `graphql` to ^0.13, support testing all compatible versions [jnwng](https://github.com/jnwng) in | ||
[PR #156](https://github.com/apollographql/graphql-tag/pull/156) | ||
@@ -10,3 +13,11 @@ * Export single queries as both default and named [stonexer](https://github.com/stonexer) in | ||
### v2.7.{0,1,2,3} | ||
* Merge and then revert [PR #141](https://github.com/apollographql/graphql-tag/pull/141) due to errors being thrown | ||
### v2.6.1 | ||
* Accept `graphql@^0.12.0` as peerDependency [jnwng](https://github.com/jnwng) | ||
addressing [#134](https://github.com/apollographql/graphql-tag/issues/134) | ||
### v2.6.0 | ||
@@ -13,0 +24,0 @@ |
@@ -118,7 +118,10 @@ "use strict"; | ||
// Copy the DocumentNode, but clear out the definitions | ||
var newDoc = Object.assign({}, doc); | ||
var newDoc = { | ||
kind: doc.kind, | ||
definitions: [findOperation(doc, operationName)] | ||
}; | ||
if (doc.hasOwnProperty("loc")) { | ||
newDoc.loc = doc.loc; | ||
} | ||
var op = findOperation(doc, operationName); | ||
newDoc.definitions = [op]; | ||
// Now, for the operation we're running, find any fragments referenced by | ||
@@ -125,0 +128,0 @@ // it or the fragments it references |
{ | ||
"name": "graphql-tag", | ||
"version": "2.8.0", | ||
"version": "2.9.0", | ||
"description": "A JavaScript template literal tag that parses GraphQL queries", | ||
@@ -5,0 +5,0 @@ "main": "./lib/graphql-tag.umd.js", |
@@ -86,2 +86,17 @@ const gqlRequire = require('../src'); | ||
// see https://github.com/apollographql/graphql-tag/issues/168 | ||
it('does not nest queries needlessly in named exports', () => { | ||
const jsSource = loader.call({ cacheable() {} }, ` | ||
query Q1 { testQuery } | ||
query Q2 { testQuery2 } | ||
query Q3 { test Query3 } | ||
`); | ||
const module = { exports: undefined }; | ||
eval(jsSource); | ||
assert.notExists(module.exports.Q2.Q1); | ||
assert.notExists(module.exports.Q3.Q1); | ||
assert.notExists(module.exports.Q3.Q2); | ||
}); | ||
it('tracks fragment dependencies from multiple queries through webpack loader', () => { | ||
@@ -88,0 +103,0 @@ const jsSource = loader.call({ cacheable() {} }, ` |
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
112581
22
1087
12