{"id":49245,"library":"rollup-plugin-graphql","title":"rollup-plugin-graphql","description":"Converts GraphQL (.graphql) files into ES6 modules for use with Rollup bundler. Version 0.1.0 has infrequent releases. Minimal plugin with no additional features beyond file-to-module conversion, contrasting with more feature-rich alternatives like graphql-tag/loader. Only supports GraphQL documents, not fragments or operations separately. Requires peer dependency graphql ^0.9.0 or ^0.10.0. Limited to Rollup; not compatible with other bundlers.","status":"active","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/kamilkisiela/rollup-plugin-graphql","tags":["javascript","graphql","rollup","rollupjs"],"install":[{"cmd":"npm install rollup-plugin-graphql","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-graphql","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-graphql","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used to parse and validate GraphQL documents; peer dependency.","package":"graphql","optional":false}],"imports":[{"note":"The plugin is a default export; named import is incorrect.","wrong":"import { graphql } from 'rollup-plugin-graphql'","symbol":"graphql (default export)","correct":"import graphql from 'rollup-plugin-graphql'"},{"note":"CommonJS usage works but requires a default import via require.","wrong":null,"symbol":"graphql function","correct":"const graphql = require('rollup-plugin-graphql')"},{"note":"Accepts Rollup plugin options like include/exclude; no GraphQL-specific options.","wrong":null,"symbol":"graphql configuration","correct":"graphql({ include: '**/*.graphql', exclude: 'node_modules/**' })"}],"quickstart":{"code":"import { rollup } from 'rollup';\nimport graphql from 'rollup-plugin-graphql';\n\nrollup({\n  input: 'src/main.js',\n  plugins: [\n    graphql()\n  ],\n  output: {\n    file: 'dist/bundle.js',\n    format: 'esm'\n  }\n});","lang":"javascript","description":"Shows using rollup-plugin-graphql to import a GraphQL schema file in a Rollup build."},"warnings":[{"fix":"Pin graphql to ^0.10.0 or use a different plugin.","message":"Peer dependency graphql version range ^0.9.0 || ^0.10.0; may break with newer versions.","severity":"breaking","affected_versions":">=0.1.0"},{"fix":"Use graphql-tag/loader or other tools for advanced GraphQL usage.","message":"Only supports converting single GraphQL documents; cannot handle fragments or operations separately.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Rename files to .graphql or adjust plugin configuration.","message":"No support for .gql extension; only .graphql files are processed.","severity":"gotcha","affected_versions":">=0.1.0"}],"env_vars":null,"search_vec":"'/loader':45 '0.1.0':18 '0.10.0':61 '0.9.0':59 'addit':26 'altern':40 'beyond':28 'bundler':16,69 'compat':66 'contrast':34 'convers':33 'convert':5 'depend':57 'document':49 'es6':10 'featur':27,38 'feature-rich':37 'file':8,30 'file-to-modul':29 'fragment':51 'graphql':4,6,7,43,48,58,71 'graphql-tag':42 'infrequ':20 'javascript':70 'like':41 'limit':62 'minim':22 'modul':11,32 'oper':53 'peer':56 'plugin':3,23 'releas':21 'requir':55 'rich':39 'rollup':2,15,64,72 'rollup-plugin-graphql':1 'rollupj':73 'separ':54 'support':47 'tag':44 'use':13 'version':17","created_at":"2026-06-07T17:00:47.483250+00:00","updated_at":"2026-06-07T17:00:47.483250+00:00","problems":[{"fix":"Run npm install --save-dev rollup-plugin-graphql","cause":"Local module not installed; missing from node_modules.","error":"Error: Cannot find module 'rollup-plugin-graphql'"},{"fix":"Ensure the file exists and path is correct; consider using absolute paths.","cause":"GraphQL file path incorrect or missing extension.","error":"Error: Could not resolve './schema.graphql'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/kamilkisiela/rollup-plugin-graphql#readme","github":"https://github.com/kamilkisiela/rollup-plugin-graphql","docs":null,"changelog":null,"pypi":null,"npm":"rollup-plugin-graphql","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}