Skip to content

return-on-async

Severity: error

A Dynamic View return Step resolves to an async Relationship, which has no reply.

shop/services.yaml:

services:
web:
name: Web
relationships:
- to: cart
cart:
name: Cart
components:
cart-api:
name: Cart API
orders:
name: Orders
events:
name: Events
type: broker
mailer:
name: Mailer
relationships:
- to: orders
interaction: async
via: events
channel: order-placed
views:
dynamic:
purchase:
title: Purchase
steps:
- { from: orders, to: mailer, return: true }

Remove the return Step, or model the callback as a Relationship of its own and add a Step for it.

shop/services.yaml:

services:
web:
name: Web
relationships:
- to: cart
cart:
name: Cart
components:
cart-api:
name: Cart API
orders:
name: Orders
events:
name: Events
type: broker
mailer:
name: Mailer
relationships:
- to: orders
interaction: async
via: events
channel: order-placed
views:
dynamic:
purchase:
title: Purchase
steps:
- { from: orders, to: mailer }