Socket
Socket
Sign inDemoInstall

@graphql-tools/json-file-loader

Package Overview
Dependencies
8
Maintainers
3
Versions
1022
Alerts
File Explorer

Advanced tools

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


Version published
Weekly downloads
3M
decreased by-5.4%
Maintainers
3
Install size
2.36 MB
Created
Weekly downloads
 

Package description

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

Last updated on 22 Nov 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc