Allows importing .graphql or .gql files on Nextjs via graphql-tag.
npm install --save graphql next-graphql-loaderOr using yarn:
yarn add graphql next-graphql-loaderThen, import the library in your next.config.js file.
// next.config.js
const withGraphql = require("next-graphql-loader");
module.exports = withGraphql({});or, with next-compose-plugins:
const withGraphql = require("next-graphql-loader");
module.exports = withPlugins([withGraphql])Just import any .graphql file :)