3.1.18 • Published 5 years ago

@wheelroom/wheelroom-plugin-graphql v3.1.18

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

@wheelroom/wheelroom-plugin-graphql

This is a plugin for the @wheelroom/wheelroom package.

Have a look at the boilerplate to so see how to use this.

Commands

This plugin adds the create-graphql command which lets you create boilerplate graphql. Intended use is generating files for Gatsbyjs, a static site generator.

wheelroom create-graphql <template-set> <path> [options]

Config

The plugin is configured by adding it to wheelroom-config.js

var templateSets = require('./wheelroom-template-sets')

module.exports = {
  components: {
      ...
  },
  plugins: [
    {
      resolve: '@wheelroom/wheelroom-plugin-graphql',
      options: {
        templateSets: templateSets,
      },
    },
  ],
}

Template sets

Using typescript, template sets are defined like this.

import { TemplateSets } from '@wheelroom/wheelroom-plugin-graphql'
import { fragment } from './fragment'
import { query } from './query'

export const templateSets: TemplateSets = {
  gatsbyjs: {
    fragment: {
      filterComponentSetting: 'asFragment',
      path: '%component-name%-fragment.js',
      template: fragment,
    },
    query: {
      filterComponentSetting: 'asQuery',
      path: '%component-name%-query.js',
      template: query,
    },
  },
}
3.1.18

5 years ago

3.1.17

5 years ago

3.1.15

5 years ago

3.1.14

5 years ago

3.1.13

5 years ago

3.1.12

5 years ago

3.1.11

5 years ago

3.1.10

5 years ago

3.1.9

5 years ago

3.1.7

5 years ago

3.1.8

5 years ago

3.1.6

5 years ago

3.1.5

5 years ago

3.1.4

5 years ago

3.1.3

5 years ago

3.1.2

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.2

5 years ago

3.0.0

5 years ago

2.3.2

5 years ago

2.3.1

5 years ago