Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@graphql-tools/json-file-loader

Package Overview
Dependencies
Maintainers
3
Versions
1033
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.2-rc-20241015101846-38da2809b3a565142973ca967c0294c061726b5b
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.6M
increased by6.98%
Maintainers
3
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 15 Oct 2024

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

  • 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