UiDevkitClient
setTargetOrigin
Set the window.postMessage API
targetOrigin. The Vendure ui-devkit uses the postMessage API to
enable cross-frame and cross-origin communication between the ui extension code and the Admin UI
app. The targetOrigin is a security feature intended to provide control over where messages are sent.
Parameters
value
parameter
stringgetActivatedRoute
Retrieves information about the current route of the host application, since it is not possible to otherwise get this information from within the child iframe.
Example
graphQlQuery
Perform a GraphQL query and returns either an Observable or a Promise of the result.
Example
Parameters
document
parameter
stringvariables
parameter
{ [key: string]: any }fetchPolicy
parameter
WatchQueryFetchPolicygraphQlMutation
Perform a GraphQL mutation and returns either an Observable or a Promise of the result.
Example
Parameters
document
parameter
stringvariables
parameter
{ [key: string]: any }notify
Display a toast notification.
Example
Parameters
options
parameter
NotificationMessage['data']Was this chapter helpful?