REST API - Subentities #1767
-
Hi, I just started working with DAB and am encountering an issue when attempting to create a customer -> customer address structure within the REST API. I have created two entities, one named 'customers' and the other called 'addresses' (both of type "view") and used the "relationships" node to match them based on corresponding ID fields.
However, it returns just the 'customers' entity:
I have set the relationship as follows:
Addresses -> Customers
I have also tried using linking.object instead but I received the same result. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In DAB, REST API does not support relationship navigation. If you want to take advantage of relationships you need to use GraphQL (which is a REST operation anyway, more specifically is a POST operation). The reason behind this decision was that REST should be simple and not re-invent the wheel (and yet another standard). If people really want to do complex stuff with REST, we'll need to evaluate the adoption of OData as additional protocol. Otherwise GraphQL should cover pretty much all the use cases. |
Beta Was this translation helpful? Give feedback.
In DAB, REST API does not support relationship navigation. If you want to take advantage of relationships you need to use GraphQL (which is a REST operation anyway, more specifically is a POST operation).
The reason behind this decision was that REST should be simple and not re-invent the wheel (and yet another standard). If people really want to do complex stuff with REST, we'll need to evaluate the adoption of OData as additional protocol. Otherwise GraphQL should cover pretty much all the use cases.