2.0.0 • Published 3 years ago

preact-cli-plugin-graphql v2.0.0

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

preact-cli-plugin-graphql

Preprocess GraphQL queries with the Preact CLI.

NPM version Build Status

Installation

$ yarn add preact-cli-plugin-graphql graphql-tag --dev

Alternatively using npm:

$ npm i preact-cli-plugin-graphql graphql-tag --save-dev

And include in your project by creating a preact.config.js:

const graphql = require('preact-cli-plugin-graphql');

export default function (config) {
  graphql(config);
}

Usage

The plugin allows to import any graphql files (with the .graphql or .gql) extension directly within your script:

import query from './query.gql';

You can read more about this processing at the graphql-tag documentation

License

MIT © Robin van der Vleuten

2.0.0

3 years ago

1.0.1

7 years ago

1.0.0

7 years ago