Initial commit from monorepo
This commit is contained in:
75
codegen.ts
Normal file
75
codegen.ts
Normal file
@@ -0,0 +1,75 @@
|
||||
import type { CodegenConfig } from '@graphql-codegen/cli'
|
||||
|
||||
const plugins = [
|
||||
'typescript',
|
||||
'typescript-operations',
|
||||
'typed-document-node',
|
||||
]
|
||||
|
||||
const pluginConfig = {
|
||||
scalars: {
|
||||
DateTime: 'string',
|
||||
},
|
||||
useTypeImports: true,
|
||||
}
|
||||
|
||||
const config: CodegenConfig = {
|
||||
overwrite: true,
|
||||
generates: {
|
||||
// Public operations (no token)
|
||||
'./app/composables/graphql/public/exchange-generated.ts': {
|
||||
schema: 'https://exchange.optovia.ru/graphql/public/',
|
||||
documents: './graphql/operations/public/exchange/*.graphql',
|
||||
plugins,
|
||||
config: pluginConfig,
|
||||
},
|
||||
'./app/composables/graphql/public/geo-generated.ts': {
|
||||
schema: 'https://geo.optovia.ru/graphql/public/',
|
||||
documents: './graphql/operations/public/geo/*.graphql',
|
||||
plugins,
|
||||
config: pluginConfig,
|
||||
},
|
||||
|
||||
// User-level operations (ID Token)
|
||||
'./app/composables/graphql/user/teams-generated.ts': {
|
||||
schema: 'https://teams.optovia.ru/graphql/user/',
|
||||
documents: './graphql/operations/user/teams/*.graphql',
|
||||
plugins,
|
||||
config: pluginConfig,
|
||||
},
|
||||
'./app/composables/graphql/user/kyc-generated.ts': {
|
||||
schema: 'https://kyc.optovia.ru/graphql/user/',
|
||||
documents: './graphql/operations/user/kyc/*.graphql',
|
||||
plugins,
|
||||
config: pluginConfig,
|
||||
},
|
||||
|
||||
// Team-level operations (Access Token)
|
||||
'./app/composables/graphql/team/teams-generated.ts': {
|
||||
schema: 'https://teams.optovia.ru/graphql/team/',
|
||||
documents: './graphql/operations/team/teams/*.graphql',
|
||||
plugins,
|
||||
config: pluginConfig,
|
||||
},
|
||||
'./app/composables/graphql/team/orders-generated.ts': {
|
||||
schema: 'https://orders.optovia.ru/graphql/team/',
|
||||
documents: './graphql/operations/team/orders/*.graphql',
|
||||
plugins,
|
||||
config: pluginConfig,
|
||||
},
|
||||
'./app/composables/graphql/team/exchange-generated.ts': {
|
||||
schema: 'https://exchange.optovia.ru/graphql/team/',
|
||||
documents: './graphql/operations/team/exchange/*.graphql',
|
||||
plugins,
|
||||
config: pluginConfig,
|
||||
},
|
||||
'./app/composables/graphql/team/billing-generated.ts': {
|
||||
schema: 'https://billing.optovia.ru/graphql/team/',
|
||||
documents: './graphql/operations/team/billing/*.graphql',
|
||||
plugins,
|
||||
config: pluginConfig,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export default config
|
||||
Reference in New Issue
Block a user