ember-cli-mirage
ember-cli-mirage copied to clipboard
Configure route to add relationships but not includes to the response payload
For models that have a belongsTo
relationship, the API which I'm mocking:
- will sometimes ignore related data entirely (Neither
relationships
norincludes
are part of the response payload), - will sometimes include both
relationships
andincludes
in the response payload. - will sometimes include the
relationships
object, but will not sideload the data, soincludes
is not a part of the response payload,
Case 1 is solved by setting alwaysIncludeLinkageData
to false
.
Case 2 is solved by using the includes
query param.
Does Mirage have a built-in way to configure an individual route in config.js
to have relationships
in the payload, but not the includes
array?