Directly load the group in OrganizerPickerWrapper if we have the group ID

Fixes #997

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-04-03 22:18:33 +02:00
parent a2bb0c0a4d
commit 84a5c6f893
2 changed files with 40 additions and 15 deletions

View File

@@ -351,6 +351,30 @@ export const PERSON_STATUS_GROUP = gql`
${ACTOR_FRAGMENT}
`;
export const PERSON_GROUP_MEMBERSHIPS = gql`
query PersonGroupMemberships($id: ID!, $groupId: ID!) {
person(id: $id) {
id
memberships(groupId: $groupId) {
total
elements {
id
role
parent {
...ActorFragment
}
invitedBy {
...ActorFragment
}
insertedAt
updatedAt
}
}
}
}
${ACTOR_FRAGMENT}
`;
export const GROUP_MEMBERSHIP_SUBSCRIPTION_CHANGED = gql`
subscription GroupMembershipSubscriptionChanged(
$actorId: ID!