mirror of
https://github.com/unraid/api.git
synced 2026-01-01 14:10:10 -06:00
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - sizeRootFs now reported in bytes as BigInt. - Container listings include size only when requested; caching distinguishes size vs no-size. - New Docker-related fields: per-container update statuses, rebuild/update indicators, spinning state, and a mutation to refresh docker digests. - **Tests** - Added unit tests for GraphQL field inspection and container size/cache behavior. - **Chores** - Version bumped to 4.22.2. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
56 lines
1.6 KiB
TypeScript
56 lines
1.6 KiB
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: {
|
|
// Generate Types for Mothership GraphQL Client
|
|
'src/graphql/generated/client/': {
|
|
documents: './src/graphql/**/*.ts',
|
|
schema: {
|
|
[process.env.MOTHERSHIP_GRAPHQL_LINK ?? 'https://staging.mothership.unraid.net/ws']: {
|
|
headers: {
|
|
origin: 'https://forums.unraid.net',
|
|
},
|
|
},
|
|
},
|
|
preset: 'client',
|
|
presetConfig: {
|
|
gqlTagName: 'graphql',
|
|
},
|
|
config: {
|
|
useTypeImports: true,
|
|
withObjectType: true,
|
|
},
|
|
plugins: [{ add: { content: '/* eslint-disable */' } }],
|
|
},
|
|
},
|
|
};
|
|
|
|
export default config;
|