Files
cloudbeaver/webapp/packages/core-sdk/codegen.ts
T
Alexey 4550a71298 Refactor CB-3819 resources (#2031)
* CB-3819 refactor: split resources to modules

* CB-3819 refactor: move resource API to separate package

* CB-3819 refactor: move resource API to separate package

* CB-3819 refactor: split to submodules

* CB-3819 chore: update ts configuration

* CB-3819 refactor: move administration top bar to separate plugin

* CB-3819 feat: update tests

* CB-3819 chore: add pre scripts

* CB-3819 fix: prebuild tests-runner

* chore: restore cache for jest-tests github action

* chore: update configs

* chore: add frontend build action

* chore: rename build frontend github action

* chore: include test dependencies

* fix: default product build script

* chore: update github action

* chore: rename validation github action

* chore: update typescript cache key

* chore: update naming for github actions

* chore: run tests on ubuntu

* CB-3819 fix: pre build tasks

* CB-3819 fix: ignore order

* CB-3819 fix: remove prettier from gql sdk
2023-10-05 23:36:54 +03:00

37 lines
878 B
TypeScript

import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema: '../../../server/bundles/*/schema/**/*.graphqls',
documents: './src/**/*.gql',
generates: {
'./src/sdk.ts': {
plugins: [{ add: { content: '/* eslint-disable */' } }, 'typescript', 'typescript-operations', 'typescript-graphql-request'],
},
},
config: {
skipTypename: true,
documentMode: 'string',
useTypeImports: true,
avoidOptionals: {
field: false,
inputValue: false,
object: false,
},
maybeValue: 'T', // T | null'
declarationKind: {
union: 'type',
type: 'interface',
input: 'interface',
scalar: 'interface',
arguments: 'interface',
},
scalars: {
Object: 'any',
JSON: '{ [key: string]: any }',
DateTime: 'any',
},
},
};
export default config;