Files
api/packages/unraid-api-plugin-connect/codegen.ts
Eli Bosley 92e30e2c7d refactor: consolidate unraid-api-plugin-connect package and update dependencies
- Renamed the unraid-api-plugin-connect-2 package back to unraid-api-plugin-connect for consistency.
- Updated pnpm-lock.yaml to reflect the new package structure and dependencies.
- Modified environment variables to standardize Mothership API integration.
- Removed deprecated GraphQL code generation and related types, streamlining the API.
- Enhanced connection status handling and introduced new services for WebSocket communication with Mothership.
2025-12-01 12:43:13 -05:00

37 lines
1016 B
TypeScript

import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
overwrite: true,
emitLegacyCommonJSImports: false,
verbose: true,
config: {
namingConvention: {
enumValues: 'change-case-all#upperCase',
transformUnderscore: true,
useTypeImports: true,
},
scalars: {
DateTime: 'string',
Long: 'number',
JSON: 'Record<string, any>',
URL: 'URL',
Port: 'number',
UUID: 'string',
BigInt: 'number',
},
scalarSchemas: {
URL: 'z.instanceof(URL)',
Long: 'z.number()',
JSON: 'z.record(z.string(), z.any())',
Port: 'z.number()',
UUID: 'z.string()',
BigInt: 'z.number()',
},
},
generates: {
// No longer generating mothership GraphQL types since we switched to WebSocket-based UnraidServerClient
},
};
export default config;