2.3.0 • Published 4 years ago

@jacco-meijer/wheelroom-plugin-graphql v2.3.0

Weekly downloads
27
License
MIT
Repository
github
Last release
4 years ago

@jacco-meijer/wheelroom-plugin-graphql

This is a plugin for the @jacco-meijer/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: '@jacco-meijer/wheelroom-plugin-graphql',
      options: {
        templateSets: templateSets,
      },
    },
  ],
}

Template sets

Using typescript, template sets are defined like this.

import { TemplateSets } from '@jacco-meijer/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,
    },
  },
}
2.3.0

4 years ago

2.2.0

4 years ago

2.1.21

4 years ago

2.1.20

4 years ago

2.1.19

4 years ago

2.1.18

4 years ago

2.1.17

4 years ago

2.1.16

4 years ago

2.1.15

4 years ago

2.1.14

4 years ago

2.1.13

4 years ago

2.1.12

4 years ago

2.1.11

4 years ago

2.1.10

4 years ago

2.1.9

4 years ago

2.1.8

4 years ago

2.1.7

4 years ago

2.1.6

4 years ago

2.1.5

4 years ago

2.1.2

4 years ago

2.1.4

4 years ago

2.1.3

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago