Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Ty3uK/parcel-plugin-graphql-raw

Allows Parcel to export GraphQL files as plain text
https://github.com/Ty3uK/parcel-plugin-graphql-raw

Last synced: 3 months ago
JSON representation

Allows Parcel to export GraphQL files as plain text

Awesome Lists containing this project

README

        


parcel
graphql

[![Travis CI Build Status](https://travis-ci.com/Ty3uK/parcel-plugin-graphql-raw.svg?branch=master)](https://travis-ci.com/Ty3uK/parcel-plugin-graphql-raw)
[![Dependencies](https://david-dm.org/Ty3uK/parcel-plugin-graphql-raw.svg?branch=master)](https://david-dm.org/Ty3uK/parcel-plugin-graphql-raw)
[![npm package](https://img.shields.io/npm/v/parcel-plugin-graphql-raw.svg)](https://www.npmjs.com/package/parcel-plugin-graphql-raw)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# parcel-plugin-graphql-raw

Some packages (like [nanographql](https://github.com/yoshuawuyts/nanographql)) uses plain-text GraphQL Schema instead of JSON, generated by [graphql-tag](https://github.com/apollographql/graphql-tag).

Since [GraphqlAsset](https://github.com/parcel-bundler/parcel/blob/master/packages/core/parcel-bundler/src/assets/GraphqlAsset.js) uses [graphql-tag](https://github.com/apollographql/graphql-tag), this plugin allows [Parcel](https://github.com/parcel-bundler/parcel) to export GraphQL files as plain text

## Usage

Install plugin:

```bash
# via yarn
yarn add -D parcel-plugin-graphql-raw
# via npm
npm i -D parcel-plugin-graphql-raw
```

Import GraphQL file (with .graphql or .gql extension):

```javascript
import simple from './simple.gql';
```

## License

[MIT](LICENSE)