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.5.0-alpha-26d1f1e3.0 to 6.5.0-alpha-33ae0978.0

6

es5/index.d.ts

@@ -0,1 +1,2 @@

import type { LoaderContext } from 'webpack';
interface Options {

@@ -9,6 +10,3 @@ noDescription?: boolean;

}
export default function graphqlLoader(this: {
query: Options;
cacheable: VoidFunction;
}, source: string): string;
export default function graphqlLoader(this: LoaderContext<Options>, source: string): string;
export {};

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

this.cacheable();
// TODO: This should probably use this.getOptions()
var options = this.query || {};

@@ -110,6 +111,6 @@ var doc = parseDocument(source);

if (options.replaceKinds) {
Object.keys(graphql.Kind).forEach(function (identifier) {
for (var identifier in graphql.Kind) {
var value = graphql.Kind[identifier];
stringifiedDoc = stringifiedDoc.replace(new RegExp("\"kind\":\"" + value + "\"", 'g'), "\"kind\": Kind." + identifier);
});
}
}

@@ -143,2 +144,1 @@ var headerCode = "\n " + (options.replaceKinds ? "var Kind = require('graphql/language/kinds');" : '') + "\n var doc = " + stringifiedDoc + ";\n ";

module.exports = graphqlLoader;
//# sourceMappingURL=index.js.map
{
"name": "@graphql-tools/webpack-loader/es5",
"version": "6.5.0-alpha-26d1f1e3.0",
"version": "6.5.0-alpha-33ae0978.0",
"description": "A set of utils for faster development of GraphQL tools",

@@ -5,0 +5,0 @@ "sideEffects": false,

@@ -0,1 +1,2 @@

import type { LoaderContext } from 'webpack';
interface Options {

@@ -9,6 +10,3 @@ noDescription?: boolean;

}
export default function graphqlLoader(this: {
query: Options;
cacheable: VoidFunction;
}, source: string): string;
export default function graphqlLoader(this: LoaderContext<Options>, source: string): string;
export {};

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

this.cacheable();
// TODO: This should probably use this.getOptions()
const options = this.query || {};

@@ -115,6 +116,6 @@ let doc = parseDocument(source);

if (options.replaceKinds) {
Object.keys(graphql.Kind).forEach((identifier) => {
for (const identifier in graphql.Kind) {
const value = graphql.Kind[identifier];
stringifiedDoc = stringifiedDoc.replace(new RegExp(`"kind":"${value}"`, 'g'), `"kind": Kind.${identifier}`);
});
}
}

@@ -153,2 +154,1 @@ const headerCode = `

module.exports = graphqlLoader;
//# sourceMappingURL=index.js.map
{
"name": "@graphql-tools/webpack-loader",
"version": "6.5.0-alpha-26d1f1e3.0",
"version": "6.5.0-alpha-33ae0978.0",
"description": "A set of utils for faster development of GraphQL tools",

@@ -5,0 +5,0 @@ "sideEffects": false,

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