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

@graphql-tools/git-loader

Package Overview
Dependencies
Maintainers
3
Versions
1139
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@graphql-tools/git-loader

A set of utils for faster development of GraphQL tools

  • 8.0.8-rc-20241015101057-a5c6b916f4c768141dd73da6284f324a69ead411
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.8M
decreased by-1.82%
Maintainers
3
Weekly downloads
 
Created

What is @graphql-tools/git-loader?

The @graphql-tools/git-loader package is designed to load GraphQL schema files and documents directly from a Git repository. This is particularly useful for managing and integrating GraphQL schemas and documents that are version-controlled in Git, allowing developers to fetch and utilize these resources dynamically in their GraphQL server implementations.

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

Load GraphQL schemas from Git

This feature allows developers to load GraphQL schemas directly from a Git repository. The code sample demonstrates how to load a schema from a specific branch and path within a Git-hosted repository using the GitLoader.

import { loadSchema } from '@graphql-tools/git-loader';

async function getSchema() {
  const schema = await loadSchema('git://github.com/example/repo#branch:path/to/schema.graphql', {
    loaders: [
      new GitLoader()
    ]
  });
  return schema;
}

Load GraphQL documents from Git

This feature enables the loading of GraphQL documents (queries, mutations, subscriptions) from a Git repository. The provided code sample shows how to fetch documents using a glob pattern from a specified branch and path in a repository.

import { loadDocuments } from '@graphql-tools/git-loader';

async function getDocuments() {
  const documents = await loadDocuments('git://github.com/example/repo#branch:path/to/documents/*.graphql', {
    loaders: [
      new GitLoader()
    ]
  });
  return documents;
}

Other packages similar to @graphql-tools/git-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