@shellicar/build-graphql
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@shellicar/build-graphql

Build plugin that loads GraphQL files and makes them available through a virtual module import.

Installation & Quick Start

npm i --save @shellicar/build-graphql
pnpm add @shellicar/build-graphql
// build.ts
import GraphQLPlugin from '@shellicar/build-graphql/esbuild'

await build({
  // other options
  plugins: [
    GraphQLPlugin({ 
      globPattern: 'src/**/*.graphql'
    })
  ]
})
// vite.config.ts
import GraphQLPlugin from '@shellicar/build-graphql/vite'

export default defineConfig({
  // other options
  plugins: [
    GraphQLPlugin({ 
      globPattern: 'src/**/*.graphql'
    })
  ],
});
// main.ts
import typedefs from '@shellicar/build-graphql/typedefs'

Documentation

For full documentation, visit here.

Package Sidebar

Install

npm i @shellicar/build-graphql

Weekly Downloads

27

Version

1.0.1

License

MIT

Unpacked Size

98.4 kB

Total Files

117

Last publish

Collaborators

  • shellicar