CRACO plugin for graphql-loader
npm install craco-graphql-loaderPlugin for craco which allows configuring the graphql-tag/loader inside of react-scripts applications.
Install
``bash
npm i craco-graphql-loader
yarn add craco-graphql-loader
`
Add this plugin to your craco.config.js:
`js
const cracoGraphqlLoader = require("craco-graphql-loader");
module.exports = {
plugins: [{ plugin: cracoGraphqlLoader }],
};
`
Then import any query:
`jsx
import GreatQuery from './MyAwesomeQuery.graphl
```
For full usage instructions visit: https://github.com/apollographql/graphql-tag