Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-tag

Package Overview
Dependencies
Maintainers
6
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-tag - npm Package Compare versions

Comparing version 2.8.0 to 2.9.0

.github/ISSUE_TEMPLATE.md

15

CHANGELOG.md
# 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 @@

11

loader.js

@@ -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() {} }, `

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc