1.0.1 • Published 6 months ago
@shellicar/build-graphql v1.0.1
@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.