Socket
Socket
Sign inDemoInstall

@graphql-tools/load-files

Package Overview
Dependencies
Maintainers
3
Versions
637
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/load-files - npm Package Compare versions

Comparing version 6.4.0 to 6.5.0

15

index.js

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

const fs = require('fs');
const graphql = require('graphql');

@@ -133,3 +134,4 @@ const { readFile, stat } = fs.promises;

else {
return fs.readFileSync(path$1, { encoding: 'utf-8' });
const maybeSDL = fs.readFileSync(path$1, { encoding: 'utf-8' });
return tryToParse(maybeSDL);
}

@@ -193,3 +195,4 @@ })

else {
return readFile(path$1, { encoding: 'utf-8' });
const maybeSDL = await readFile(path$1, { encoding: 'utf-8' });
return tryToParse(maybeSDL);
}

@@ -202,4 +205,12 @@ }));

}
function tryToParse(maybeSDL) {
try {
return graphql.parse(maybeSDL);
}
catch (e) {
return maybeSDL;
}
}
exports.loadFiles = loadFiles;
exports.loadFilesSync = loadFilesSync;

2

package.json
{
"name": "@graphql-tools/load-files",
"version": "6.4.0",
"version": "6.5.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

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