graphql-tag
Advanced tools
Comparing version 2.7.3 to 2.8.0
# Change log | ||
### v2.7.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) | ||
* Export single queries as both default and named [stonexer](https://github.com/stonexer) in | ||
[PR #154](https://github.com/apollographql/graphql-tag/pull/154) | ||
### v2.6.0 | ||
@@ -4,0 +12,0 @@ |
@@ -63,3 +63,3 @@ "use strict"; | ||
if (operationCount <= 1) { | ||
if (operationCount < 1) { | ||
outputCode += ` | ||
@@ -69,3 +69,3 @@ module.exports = doc; | ||
} else { | ||
outputCode +=` | ||
outputCode += ` | ||
// Collect any fragment/type references from a node, adding them to the refs Set | ||
@@ -117,3 +117,3 @@ function collectFragmentReferences(node, refs) { | ||
} | ||
function oneQuery(doc, operationName) { | ||
@@ -125,3 +125,3 @@ // Copy the DocumentNode, but clear out the definitions | ||
newDoc.definitions = [op]; | ||
// Now, for the operation we're running, find any fragments referenced by | ||
@@ -153,3 +153,3 @@ // it or the fragments it references | ||
}); | ||
return newDoc; | ||
@@ -164,3 +164,7 @@ } | ||
if (!op.name) { | ||
throw "Query/mutation names are required for a document with multiple definitions"; | ||
if (operationCount > 1) { | ||
throw "Query/mutation names are required for a document with multiple definitions"; | ||
} else { | ||
continue; | ||
} | ||
} | ||
@@ -167,0 +171,0 @@ |
{ | ||
"name": "graphql-tag", | ||
"version": "2.7.3", | ||
"version": "2.8.0", | ||
"description": "A JavaScript template literal tag that parses GraphQL queries", | ||
@@ -10,3 +10,3 @@ "main": "./lib/graphql-tag.umd.js", | ||
"bundle": "rollup -c && cp src/index.js.flow lib/graphql-tag.umd.js.flow", | ||
"test": "mocha --require babel-register", | ||
"test": "mocha test/graphql.js test/graphql-v0.12.js && tav --ci --compat", | ||
"prepublish": "npm run bundle" | ||
@@ -29,9 +29,10 @@ }, | ||
"chai": "^4.0.2", | ||
"graphql": "^0.11.0", | ||
"graphql": "^0.13.0", | ||
"mocha": "^3.4.1", | ||
"rollup": "^0.45.0" | ||
"rollup": "^0.45.0", | ||
"test-all-versions": "^3.3.2" | ||
}, | ||
"peerDependencies": { | ||
"graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0" | ||
"graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
110790
21
1070
7
2
11