@shellicar/build-graphql
v1.4.3
Published
Build plugin that loads GraphQL files and makes them importable via a virtual typedefs module.
Maintainers
Readme
@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-graphqlpnpm 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 the GitHub repository.
