feat: Application types generation from project GQL schema's (#8995)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
import { defineJoinerConfig, Modules } from "@medusajs/utils"
|
||||
import { default as schema } from "./schema"
|
||||
|
||||
export const joinerConfig = defineJoinerConfig(Modules.SALES_CHANNEL, {
|
||||
schema,
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
export default `
|
||||
type SalesChannel {
|
||||
id: ID!
|
||||
name: String!
|
||||
description: String
|
||||
is_disabled: Boolean!
|
||||
created_at: DateTime!
|
||||
metadata: JSON
|
||||
updated_at: DateTime!
|
||||
deleted_at: DateTime
|
||||
}
|
||||
`
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
FilterableSalesChannelProps,
|
||||
InternalModuleDeclaration,
|
||||
ISalesChannelModuleService,
|
||||
ModuleJoinerConfig,
|
||||
ModulesSdkTypes,
|
||||
SalesChannelDTO,
|
||||
UpdateSalesChannelDTO,
|
||||
@@ -21,6 +22,7 @@ import {
|
||||
|
||||
import { SalesChannel } from "@models"
|
||||
import { UpdateSalesChanneInput } from "@types"
|
||||
import { joinerConfig } from "../joinfer-config"
|
||||
|
||||
type InjectedDependencies = {
|
||||
baseRepository: DAL.RepositoryService
|
||||
@@ -46,6 +48,10 @@ export default class SalesChannelModuleService
|
||||
this.salesChannelService_ = salesChannelService
|
||||
}
|
||||
|
||||
__joinerConfig(): ModuleJoinerConfig {
|
||||
return joinerConfig
|
||||
}
|
||||
|
||||
// @ts-expect-error
|
||||
async createSalesChannels(
|
||||
data: CreateSalesChannelDTO[],
|
||||
|
||||
Reference in New Issue
Block a user