Socket
Book a DemoInstallSign in
Socket

@graphql-tools/json-file-loader

Package Overview
Dependencies
Maintainers
4
Versions
1123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/json-file-loader

A set of utils for faster development of GraphQL tools

8.0.17-alpha-20250313112505-8efeb528d413c0973336fb16b420b5ff158d18f2
Source
npmnpm
Version published
Weekly downloads
4.2M
-0.82%
Maintainers
4
Weekly downloads
 
Created

What is @graphql-tools/json-file-loader?

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.

What are @graphql-tools/json-file-loader's main functionalities?

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;
}

Other packages similar to @graphql-tools/json-file-loader

FAQs

Package last updated on 13 Mar 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.