tableflip/gatsby-source-tune

Name: gatsby-source-tune

Owner: TABLEFLIP

Description: Gatsby plugin to expose TUNE data as GraphQL sources

Created: 2017-11-06 16:46:31.0

Updated: 2017-11-06 16:47:51.0

Pushed: 2017-11-07 16:32:21.0

Homepage: null

Size: 103

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

gatsby-source-tune

Gatsby plugin to expose TUNE data as GraphQL nodes.

Creates Facts and Content nodes and FactsSchema and Schema nodes.

Install

npm install --save gatsby-source-tune

How to use
n your gatsby-config.js
ins: [

resolve: 'gatsby-source-tune',
options: {
  name: 'tune',
  path: `${__dirname}/` // Default process.cwd()
}


How to query

You can query file nodes like the following:


cts {
some
facts
props

ctsSchema {
some
schema
props

meContent: content(page: { eq: "home" }) {
content
for
home
page

meSchema: schema(page: { eq: "home" }) {
schema
for
home
page

outContent: content(page: { eq: "about" }) {
content
for
about
page

outSchema: schema(page: { eq: "about" }) {
schema
for
about
page



This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.