feat(medusa, modules-sdk, types, utils): Re work modules loading and remove legacy functions (#5496)
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
import { ModuleJoinerConfig } from "@medusajs/types"
|
||||
import { Modules } from "@medusajs/modules-sdk"
|
||||
import { StockLocation } from "./models"
|
||||
import moduleSchema from "./schema"
|
||||
|
||||
export const joinerConfig: ModuleJoinerConfig = {
|
||||
serviceName: Modules.STOCK_LOCATION,
|
||||
primaryKeys: ["id"],
|
||||
linkableKeys: { stock_location_id: StockLocation.name },
|
||||
linkableKeys: {
|
||||
stock_location_id: StockLocation.name,
|
||||
location_id: StockLocation.name,
|
||||
},
|
||||
schema: moduleSchema,
|
||||
alias: [
|
||||
{
|
||||
name: "stock_location",
|
||||
},
|
||||
{
|
||||
name: "stock_locations",
|
||||
name: ["stock_location", "stock_locations"],
|
||||
args: {
|
||||
entity: "StockLocation",
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
export default `
|
||||
scalar DateTime
|
||||
scalar JSON
|
||||
type StockLocation {
|
||||
id: ID!
|
||||
created_at: DateTime!
|
||||
updated_at: DateTime!
|
||||
deleted_at: DateTime
|
||||
name: String!
|
||||
address_id: String
|
||||
address: StockLocationAddress
|
||||
metadata: JSON
|
||||
}
|
||||
type StockLocationAddress {
|
||||
id: ID!
|
||||
created_at: DateTime!
|
||||
updated_at: DateTime!
|
||||
deleted_at: DateTime
|
||||
address_1: String!
|
||||
address_2: String
|
||||
company: String
|
||||
city: String
|
||||
country_code: String!
|
||||
phone: String
|
||||
province: String
|
||||
postal_code: String
|
||||
metadata: JSON
|
||||
}
|
||||
`
|
||||
Reference in New Issue
Block a user