Y24-479 - As a developer (Ben) I would like to refactor Aliquot polymorphism in the API. #1493
Labels
Pacbio
Size: M
Medium - medium effort & risk
Technical Debt
Technical Debt
Value: 3
Value to the insitute is average
Describe the Housekeeping
As a developer (Ben) I would like to refactor Aliquot polymorphism in the API. Currently in the Aliquot JSON::API resource we are doing some work arounds to allow the
source
andused_by
polymorphic relationships. See Aliquot model comments and PacBio Aliquot resource. We should not have to set these relationships as it should work without them.The current workarounds also do not allow nested includes, for example
source.tube
does not work, as explained here. Nested includes would help simplify querying the polymorphic data.We would like to see if this can be updated / improved so we don't have to set the types explicitly or do some hacky json api polymorphism fixes and allow us to do nested includes for polymorphic relationships.
Additional notes
JSON::API resources is not very actively maintained at the moment but there are some candidate releases that appear to address some of these issues so it is worth looking into those.
The text was updated successfully, but these errors were encountered: