jeudi 5 décembre 2019

Is it permissible to have relationships to parents of parents for JSON:API resources?

I have the following hierarchy:

venue -> concert -> booking

And within booking I have a relationship for the concert. But should the booking also have a relationship to the venue? Or is it bad practice to have relationships at that depth?

What about if there was also a seat in a booking? Would a relationship to venue still be reasonable?

Or is it better to instead do two requests to get the venue? E.g. use the booking -> concert relationship to then get the relationship between the concert and venue?

Aucun commentaire:

Enregistrer un commentaire