A graphql-codegen preset that tree-shakes unused types from TypeScript output
- Only generates TypeScript types reachable from your actual operations and fragments
- Wraps
@graphql-codegen/client-preset— drop-in replacement - Reduces generated output size by excluding unused schema types
pnpm add -D @shellicar/graphql-codegen-treeshake// codegen.ts
import { preset } from '@shellicar/graphql-codegen-treeshake';
import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: 'src/**/*.graphql',
documents: ['src/**/requests.ts'],
generates: {
'src/lib/graphql/': {
preset,
presetConfig: {
fragmentMasking: false,
},
},
},
};
export default config;@shellicar/core-config- A library for securely handling sensitive configuration values like connection strings, URLs, and secrets.@shellicar/core-di- A basic dependency injection library.
@shellicar/reference-foundation- A comprehensive starter repository. Illustrates individual concepts.@shellicar/reference-enterprise- A comprehensive starter repository. Can be used as the basis for creating a new Azure application workload.
@shellicar/build-clean- Build plugin that automatically cleans unused files from output directories.@shellicar/build-version- Build plugin that calculates and exposes version information through a virtual module import.@shellicar/build-graphql- Build plugin that loads GraphQL files and makes them available through a virtual module import.@shellicar/graphql-codegen-treeshake- A graphql-codegen preset that tree-shakes unused types from TypeScript output.
@shellicar/svelte-adapter-azure-functions- A SvelteKit adapter that builds your app into an Azure Function.@shellicar/cosmos-query-builder- Helper class for type safe advanced queries for Cosmos DB (Sql Core).@shellicar/ui-shadcn- Shared Svelte 5 component library built on shadcn-svelte with Tailwind CSS v4 theming.
@shellicar/winston-azure-application-insights- An Azure Application Insights transport for Winston logging library.@shellicar/pino-applicationinsights-transport- Azure Application Insights transport for pino