gatsby-graphql-components

0.0.2 • Public • Published

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
/>

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.22latest

Version History

VersionDownloads (Last 7 Days)Published
0.0.22
0.0.12

Package Sidebar

Install

npm i gatsby-graphql-components

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

67.6 kB

Total Files

14

Last publish

Collaborators

  • grantglidewell