2.3.0 • Published 5 years ago

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

Weekly downloads
27
License
MIT
Repository
github
Last release
5 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

5 years ago

2.2.0

5 years ago

2.1.21

5 years ago

2.1.20

5 years ago

2.1.19

5 years ago

2.1.18

5 years ago

2.1.17

5 years ago

2.1.16

5 years ago

2.1.15

5 years ago

2.1.14

5 years ago

2.1.13

5 years ago

2.1.12

5 years ago

2.1.11

5 years ago

2.1.10

5 years ago

2.1.9

5 years ago

2.1.8

6 years ago

2.1.7

6 years ago

2.1.6

6 years ago

2.1.5

6 years ago

2.1.2

6 years ago

2.1.4

6 years ago

2.1.3

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago