Socket
Socket
Sign inDemoInstall

@graphql-inspector/loaders

Package Overview
Dependencies
2
Maintainers
3
Versions
425
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-inspector/loaders


Version published
Maintainers
3
Created

Package description

What is @graphql-inspector/loaders?

@graphql-inspector/loaders is a package that provides various loaders for GraphQL schemas and documents. It allows you to load GraphQL schemas from different sources such as files, URLs, and more, making it easier to work with GraphQL in different environments.

What are @graphql-inspector/loaders's main functionalities?

Load Schema from File

This feature allows you to load a GraphQL schema from a local file. The `loadSchema` function takes the file path as an argument and returns the schema.

const { loadSchema } = require('@graphql-inspector/loaders');
const schema = loadSchema('path/to/schema.graphql');
console.log(schema);

Load Schema from URL

This feature allows you to load a GraphQL schema from a URL. The `loadSchema` function takes the URL as an argument and returns the schema.

const { loadSchema } = require('@graphql-inspector/loaders');
const schema = loadSchema('https://example.com/schema.graphql');
console.log(schema);

Load Documents from File

This feature allows you to load GraphQL documents from a local file. The `loadDocuments` function takes the file path as an argument and returns the documents.

const { loadDocuments } = require('@graphql-inspector/loaders');
const documents = loadDocuments('path/to/documents.graphql');
console.log(documents);

Load Documents from URL

This feature allows you to load GraphQL documents from a URL. The `loadDocuments` function takes the URL as an argument and returns the documents.

const { loadDocuments } = require('@graphql-inspector/loaders');
const documents = loadDocuments('https://example.com/documents.graphql');
console.log(documents);

Other packages similar to @graphql-inspector/loaders

Changelog

Source

v3.4.0

  • cli: New audit command #2164

Keywords

FAQs

Last updated on 12 Sep 2022

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc