Including resources not directly connected #954
SafaAlfulaij
started this conversation in
General
Replies: 1 comment
-
REST and JSON:API does not support something like this - if you have such use case you should consider using GraphQL. This said if you have a simple case where one resource should always return the same non-related resources you could use SerializerMethodResourceRelatedField. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Sometimes I'd like to include a resource (notification for example) to a response without it being linked to any of the resource, or the linkage wil be hard.
I mentioned "notification" because it's the easiest, and I shouldn't treat it as
map
since it can diverge a lot.Beta Was this translation helpful? Give feedback.
All reactions