It seems there are some issues when passing in serializerOptions. I believe this is in part because the actual JSONAPISerializer docs are a bit confusing. For example, if you'd like to return only the ids of your model's relationships, you must pass included: false to the serializer. However, this only works when included in the relationship options and not on a global level. As mentioned earlier, this isn't well documented; I only figured it out first through trial and error and then finally looking at the tests.
Unfortunately, I was unable to get this property passed in properly to the relationship and therefore couldn't get this working with the mapper.
Point is, I think we need to clear up our documentation, submit a PR for the serializer documentation and make any changes to allow serializer options to be passed through properly.
This probably also relates to the discussion regarding #59.
It seems there are some issues when passing in
serializerOptions
. I believe this is in part because the actual JSONAPISerializer docs are a bit confusing. For example, if you'd like to return only theid
s of your model's relationships, you must passincluded: false
to the serializer. However, this only works when included in the relationship options and not on a global level. As mentioned earlier, this isn't well documented; I only figured it out first through trial and error and then finally looking at the tests.Unfortunately, I was unable to get this property passed in properly to the relationship and therefore couldn't get this working with the mapper.
Point is, I think we need to clear up our documentation, submit a PR for the serializer documentation and make any changes to allow serializer options to be passed through properly.
This probably also relates to the discussion regarding #59.