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

@graphql-tools/webpack-loader

Package Overview
Dependencies
Maintainers
3
Versions
511
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/webpack-loader - npm Package Compare versions

Comparing version 6.0.11-alpha-d958e71.0 to 6.0.11

6

index.cjs.js

@@ -6,2 +6,3 @@ 'use strict';

const graphql = require('graphql');
const loaderUtils = require('loader-utils');

@@ -11,8 +12,11 @@ function index (path) {

this.cacheable();
const options = loaderUtils.getOptions(this);
load.loadTypedefs(path, {
loaders: [new graphqlFileLoader.GraphQLFileLoader()],
noLocation: true,
...options,
}).then(sources => {
const documents = sources.map(source => source.document);
const mergedDoc = graphql.concatAST(documents);
return callback(null, `module.exports = ${JSON.stringify(mergedDoc)}`);
return callback(null, `export default ${JSON.stringify(mergedDoc)}`);
});

@@ -19,0 +23,0 @@ }

import { loadTypedefs } from '@graphql-tools/load';
import { GraphQLFileLoader } from '@graphql-tools/graphql-file-loader';
import { concatAST } from 'graphql';
import { getOptions } from 'loader-utils';

@@ -8,8 +9,11 @@ function index (path) {

this.cacheable();
const options = getOptions(this);
loadTypedefs(path, {
loaders: [new GraphQLFileLoader()],
noLocation: true,
...options,
}).then(sources => {
const documents = sources.map(source => source.document);
const mergedDoc = concatAST(documents);
return callback(null, `module.exports = ${JSON.stringify(mergedDoc)}`);
return callback(null, `export default ${JSON.stringify(mergedDoc)}`);
});

@@ -16,0 +20,0 @@ }

10

package.json
{
"name": "@graphql-tools/webpack-loader",
"version": "6.0.11-alpha-d958e71.0",
"version": "6.0.11",
"description": "A set of utils for faster development of GraphQL tools",

@@ -10,4 +10,5 @@ "sideEffects": false,

"dependencies": {
"@graphql-tools/load": "6.0.11-alpha-d958e71.0",
"@graphql-tools/graphql-file-loader": "6.0.11-alpha-d958e71.0",
"@graphql-tools/load": "6.0.11",
"@graphql-tools/graphql-file-loader": "6.0.11",
"loader-utils": "2.0.0",
"tslib": "~2.0.0"

@@ -23,2 +24,5 @@ },

},
"devDependencies": {
"@types/loader-utils": "2.0.1"
},
"publishConfig": {

@@ -25,0 +29,0 @@ "access": "public"

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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