$chiubaca / notes / fleeting / 2022-10-23
  • Slowly but surely getting my head around custom medusa plugins works a few hurdles to get by:
    • Classes in TS are still confusing to me, especially when dependencies are automagically injected into classes for you

    • Learnt an Interesting pattern of taking injected dependencies and binding them to your local class.

    • when creating methods in Medusa custom services, these are exposed to your API, loaders and subscriptions which means your services are a giant class full of business logic. There’s lots of magic around dependency injections and a new term of dependency container as under the hood Medusa makes heavy use of Awilix.

    • hit a pretty bad bug where I cant create products to the medusa database!? - https://github.com/medusajs/medusa/issues/2034

Edit on GitHub ✏️

Hey I'm Alex Chiu 👋. These are my notes for literally anything.

I'm using the Zettelkasten method to organise my thoughts here.

My more polished writings are published to my main blog at chiubaca.com

Follow me on: Github / X (Twitter) / Mastodon / LinkedIn