You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.
As a front-end developer, I want to be able to show a list of all groups a given user has a membership in. With jsonapi, that's fairly trivial:
GET /jsonapi/og_membership/default?filter[uid.id][value]=<uuid>
However, the response gives me the related entity bundle, id, and type of the group associated with the membership. What it's missing is the title of the related group. Because of the field structure here, I can't get all the information I need about the group without making extra requests.
I see some potential solutions here:
Add a new base field for the related group title
Add a computed field for the related group title
Add a new typed data normalizer to add in the missing group title
Perhaps there are other approaches I haven't considered?
The text was updated successfully, but these errors were encountered:
Similarly, once you have the list of these membership entities and you wish to use jsonapi to create a relationship between one entity and the group referenced in the membership, you'll need the UUID of the group. That uuid ought to be included with the membership entity so you don't have to make another request just to get it.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Problem/Motivation
As a front-end developer, I want to be able to show a list of all groups a given user has a membership in. With jsonapi, that's fairly trivial:
GET /jsonapi/og_membership/default?filter[uid.id][value]=<uuid>
However, the response gives me the related entity bundle, id, and type of the group associated with the membership. What it's missing is the title of the related group. Because of the field structure here, I can't get all the information I need about the group without making extra requests.
I see some potential solutions here:
Perhaps there are other approaches I haven't considered?
The text was updated successfully, but these errors were encountered: