{"library":"rollup-plugin-graphql-tag","title":"rollup-plugin-graphql-tag","description":"Rollup plugin that imports GraphQL files (.graphql, .gql) and compiles them into JavaScript modules using graphql-tag. Supports Apollo-style type definitions and fragment imports. Version 0.1.0, stable but no recent updates. Suitable for bundling GraphQL schemas with Rollup, alternative to raw loader plugins. Requires graphql as peer dependency. Not compatible with GraphQL v15+. Converts graphql files into transpiled query/mutation/subscription documents.","language":"javascript","status":"maintenance","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-graphql-tag"],"cli":null},"imports":["import gql from 'rollup-plugin-graphql-tag'","import gql from 'rollup-plugin-graphql-tag'","import typeDefs from './schema.graphql'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// rollup.config.js\nimport gql from 'rollup-plugin-graphql-tag';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    dir: 'dist',\n    format: 'esm'\n  },\n  plugins: [\n    gql({\n      // Options:\n      // include: '**/*.graphql',\n      // exclude: 'node_modules/**',\n      // strip: true  // Remove whitespace to reduce bundle size\n    })\n  ]\n};\n\n// src/index.js\nimport { ApolloServer } from 'apollo-server';\nimport typeDefs from './schema.graphql';\n\nconst server = new ApolloServer({ typeDefs });","lang":"javascript","description":"Shows how to configure Rollup to import .graphql files using the plugin, and use the compiled schema in Apollo Server.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}