Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

gridsome-source-graphql

Package Overview
Dependencies
4
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

gridsome-source-graphql

GraphQL source for Gridsome

    1.0.2latest

Version published
Maintainers
1
Yearly downloads
7,370
increased by8.81%

Weekly downloads

Readme

Source

Forked to allow mutations.

original: https://gridsome.org/plugins/@gridsome/source-graphql

@gridsome/source-graphql

Pull a remote GraphQL schema in locally

Install

  • yarn add gridsome-source-graphql
  • npm install gridsome-source-graphql

Usage

module.exports = { plugins: [ { use: 'gridsome-source-graphql', options: { url: 'https://example.com/api', fieldName: 'puppies', typeName: 'puppyTypes', headers: { Authorization: `Bearer ${process.env.AUTH_TOKEN}`, }, }, }, ], }

Options

url

  • Type: string required

The URL of a GraphQL API endpoint to request your schema from.

fieldName

  • Type: string required

The name that should be used to namespace your remote schema when it's merged in, so that it doesn't conflict with any local data.

For instance, if you put "puppies" your remote schema's data will be available by querying like so:

query { puppies { helloWorld } }

typeName

  • Type: string
  • Defaults: fieldName

The prefix to be used for your imported schema's field types.

headers

  • Type: object

An object of headers to be passed along with your request to the API endpoint. This will generally be used to authenticate your request.

Note: For safety, you should pass any sensitive tokens/passwords as environmental variables. To learn more, see the Gridsome Docs on Environmental Variables.

Keywords

FAQs

What is gridsome-source-graphql?

GraphQL source for Gridsome

Is gridsome-source-graphql popular?

The npm package gridsome-source-graphql receives a total of 321 weekly downloads. As such, gridsome-source-graphql popularity was classified as not popular.

Is gridsome-source-graphql well maintained?

We found that gridsome-source-graphql demonstrated a not healthy version release cadence and project activity. It has 1 open source maintainer collaborating on the project.

Last updated on 10 Jun 2019
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc