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

graphql-tag

Package Overview
Dependencies
Maintainers
1
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 0.1.1 to 0.1.2

3

index.js

@@ -42,2 +42,5 @@ var parse = require('graphql/language/parser').parse;

// Support typescript, which isn't as nice as Babel about default exports
gql.default = gql;
module.exports = gql;

2

package.json
{
"name": "graphql-tag",
"version": "0.1.1",
"version": "0.1.2",
"description": "A JavaScript template literal tag that parses GraphQL queries",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,12 +0,15 @@

import gql from './index';
var gqlRequire = require('./index');
var gqlDefault = require('./index').default;
import { assert } from 'chai';
describe('gql', () => {
it('parses queries', () => {
assert.equal(gql`{ testQuery }`.kind, 'Document');
});
[gqlRequire, gqlDefault].forEach((gql, i) => {
describe(`gql ${i}`, () => {
it('parses queries', () => {
assert.equal(gql`{ testQuery }`.kind, 'Document');
});
it('returns the same object for the same query', () => {
assert.isTrue(gql`{ sameQuery }` === gql`{ sameQuery }`);
it('returns the same object for the same query', () => {
assert.isTrue(gql`{ sameQuery }` === gql`{ sameQuery }`);
});
});
});
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