Two teams acting as one
📊 Graphql API
📦 Library of
web components
⚙️ Infrastructure
🧮 Administrations
🤩 Mall web
(nearly whole, all langs)
separated infrastructure for each
search
customer
cart
bestsellers
banners
menu
category
products
filters
content
# Calls category
getCategory(categoryUrl: $categoryUrl) {
id
howto
# Calls content service
... on ContentCategory {
content {
id
title
body
}
}
# Calls product service
... on ProductCategory {
productCollection {
items {
... on Product {
...productForList
}
# Calls estimated delivery service
... on BonusSet {
estimatedDeliveries {
...productEstimatedDeliveryFragment
}
}
# Calls banners service
... on SectionBannerSlideImage {
...sectionBannerSlide
}
}
}
}
}
# Service Watchdog
# entity definition
type Watchdog @key(fields: "id") {
id: ID!
variantId: String!
validTo: DateTime
}
# Service loading products
# entity extension
extend type Watchdog @key(fields: "id") {
id: ID! @external
variantId: String! @external
product: Product @requires(fields: "variantId")
}
# extending service resolver
export default <IResolvers>{
Watchdog: {
product: async (
source: Pick<GqlWatchdog, "variantId">,
_: {},
{ dataSources }: Context,
): Promise<GqlProductExport | null> =>
dataSources.product.getProductByVariantId(Number(source.variantId)),
},
};
~50 services combined
Tech stack:
{
"$schema": "https://gitlab.mallgroup.com/di/helm-deployment-toolkit/-/raw/master/private/helm/charts/mg-generic-lib/release_spec_schema.json",
"consulServiceName": "mal-transsrv",
"team": "gf",
"service": "mal-transsrv",
"imageRepository": "registry.mallgroup.com/gf/mal-transsrv",
"imageTag": "95cfaf6d",
"replicaCount": 3,
"memory": "600Mi",
"cpuRequest": "5m",
"prometheusScrape": true,
"envs": {
"DB_CHARSET": "AL32UTF8",
},
"vaultSecrets": {
"env-prod/gf/prod/mal-transsrv": {
"DB_PASSWORD_SUPER": "DB_PASSWORD_SUPER",
}
},
"sidecars": {
"redis": {
"imageRepository": "redis",
"imageTag": "6.2-alpine",
}
}
}