GraphQL source for Gridsome
Last updated 10 months ago by hjvedvik .
Repository · Original npm · Tarball · package.json
$ cnpm install @gridsome/source-graphql 
SYNC missed versions from official npm registry.


Pull a remote GraphQL schema in locally


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


module.exports = {
  plugins: [
      use: '@gridsome/source-graphql',
      options: {
        url: 'https://example.com/api',
        fieldName: 'puppies',
        typeName: 'puppyTypes',

        headers: {
          Authorization: `Bearer ${process.env.AUTH_TOKEN}`,



  • Type: string required

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


  • 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 {


  • Type: string
  • Defaults: fieldName

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


  • 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.

Current Tags

  • 0.1.0                                ...           latest (10 months ago)

1 Versions

  • 0.1.0                                ...           10 months ago
Maintainers (1)
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 2
Last Month 1
Dependencies (4)
Dev Dependencies (0)

Copyright 2014 - 2016 © taobao.org |