Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@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 2,389,847 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.