Service Factory Reference

This section of the documentation provides a reference of the methods generated for services extending the service factory (MedusaService), and how to use them.

TipLearn more about the service factory in this documentation.

Method Names#

Generated method names are of the format {operationName}_{dataModelName}, where:

  • {operationName} is the name of the operation. For example, create.
  • {dataModelName} is the pascal-case version of the data model's key that's passed in the object parameter of MedusaService. The name is pluralized for all operations except for the retrieve operation.

Some examples of method names:

  • createPosts
  • createMyPosts
  • retrievePost
  • listPosts

Methods Reference#

NoteThe reference uses only the operation name to refer to the method.
Was this page helpful?
Edit this page