gatsby-theme-graphql-components
components for showing and updating graphql code in gatsby themes
Last updated a month ago by grantglidewell .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gatsby-theme-graphql-components 
SYNC missed versions from official npm registry.

Gatsby Theme Graphql Components

components for showing and updating graphql code in gatsby themes

Install

yarn add gatsby-graphql-components

Usage

import { Code, LiveGraphql } from 'gatsby-graphql-components';

import 'gatsby-graphql-components/prism.css';

Code Component:

<Code
code={'import React from 'react';
  import { Code, LiveGraphql } from 'gatsby-graphql-components'

  function App() {
    return (
      <div className="App">
        <header className="App-header">
        <Code
        code=''
        />

        </header>
      </div>
    );
  }

  export default App;'}
  />

LiveGraphql Component:

<LiveGraphql
  query={query} // initial query
  updateQuery={updateQuery} // callback function to update query
  src={'http://localhost:8000/___graphql?query='} // src url for graphiql, should include initial query
/>

Current Tags

  • 0.0.2                                ...           latest (a month ago)

2 Versions

  • 0.0.2                                ...           a month ago
  • 0.0.1                                ...           a month ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 32
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |