I would like to use a 'catch-all' route for actions. The problem is, that queries for relationships are then routed to the action route instead of checking them first.
Would it be possible for you to change the sequence of the routes, so that relationship routes come first?
$api
->resource('orders', [
'except' => ['create'],
'has-one' => ['customer'],
])
->controller('Api\OrdersController')
->routes(function ($order) {
$order->get('{record}/{action}', 'performAction');
});