New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

graphql-js-schema-fetch

Package Overview
Dependencies
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-js-schema-fetch

A simple command line tool for fetching the JSON representation of the GraphQL schema from a live server

  • 1.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Circle CI

graphql-js-schema-fetch

It fetches the JSON representation of the GraphQL schema from a live server

Table Of Contents

Installation

With Yarn:
$ yarn global add graphql-js-schema-fetch
With NPM:
$ npm install -g graphql-js-schema-fetch

Examples

To fetch the json representation of the graphql schema from a live server that implements the GraphQL (and optionally the Relay) spec, run:

graphql-js-schema-fetch https://www.my-server.com/api

If your server requires additional credentials or headers, use the --header option:

graphql-js-schema-fetch https://www.my-server.com/api --header "Authorization: Basic abc123" --header "X-API-Version: 1.1"

If your server uses something other than the POST method for its API, use the --method option:

graphql-js-schema-fetch https://www.my-server.com/api --method GET

API

const instance = graphqlJsSchemaFetch(url, method, [headers]);

Params you can pass graphqlJsSchemaFetch:

  • url - The url where your GraphQL API resides
  • method - The HTTP method to use while making the request
  • headers - A hash representing the key value pairs of headers to pass to node-fetch

License

MIT, see LICENSE.md for details.

Keywords

FAQs

Package last updated on 27 Mar 2017

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