Skip to main content

resolveOperationSubject

@webda/core


Function: resolveOperationSubject()

resolveOperationSubject(context, operation, args, result?): OperationSubject

Defined in: packages/core/src/core/operations.ts:200

Find the object an operation targets

  • model instance operation: the model and the key it was called with
  • operation with context.model (DomainService CRUD, behaviors): the key fields from the resolved input or the request parameters, or for Create the created object
  • queries, static model operations and plain service operations: none

Parameters​

context​

OperationContext

the operation context

operation​

OperationDefinition

the operation definition

args​

any[]

the arguments the operation was called with

result?​

any

the operation result, when it succeeded

Returns​

OperationSubject

the subject, or undefined when the operation has no single target