Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Including resources not directly connected#954

SafaAlfulaij started this conversation inGeneral
Discussion options

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 asmap since it can diverge a lot.

You must be logged in to vote

Replies: 1 comment

Comment options

REST and JSON:API does not support something like this - if you have such use case you should consider usingGraphQL.

This said if you have a simple case where one resource should always return the same non-related resources you could useSerializerMethodResourceRelatedField.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
General
Labels
None yet
2 participants
@SafaAlfulaij@sliverc

[8]ページ先頭

©2009-2025 Movatter.jp