Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@graphql-tools/json-file-loader
Advanced tools
A set of utils for faster development of GraphQL tools
The @graphql-tools/json-file-loader package is a utility that allows you to load and parse .json files directly into your GraphQL schema definitions. This is particularly useful for integrating static JSON data into your GraphQL server, enabling seamless schema stitching and data merging from various sources.
Load JSON files into GraphQL schema
This feature allows you to load JSON files as part of your GraphQL schema. The code sample demonstrates how to use the JsonFileLoader with the loadSchema function from @graphql-tools/load to asynchronously load a JSON file into a GraphQL schema.
const { loadSchema } = require('@graphql-tools/load');
const { JsonFileLoader } = require('@graphql-tools/json-file-loader');
async function loadSchemaFromJson() {
const schema = await loadSchema('path/to/file.json', {
loaders: [new JsonFileLoader()]
});
return schema;
}
The graphql-import package allows importing and merging GraphQL SDL files. While it focuses on SDL files, @graphql-tools/json-file-loader specializes in loading JSON files, making it more suitable for directly integrating JSON data into GraphQL schemas.
This package helps in merging multiple GraphQL types, resolvers, and schemas. It is similar to @graphql-tools/json-file-loader in that it aids in schema stitching, but it does not specifically support JSON file loading, focusing instead on GraphQL specific files and types.
FAQs
A set of utils for faster development of GraphQL tools
The npm package @graphql-tools/json-file-loader receives a total of 3,064,712 weekly downloads. As such, @graphql-tools/json-file-loader popularity was classified as popular.
We found that @graphql-tools/json-file-loader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.