Fix memberships dropdown store update when assuming

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-05 15:19:47 +01:00
committed by Bryan Frimin
parent 786d7e4962
commit 7423b915ae
2 changed files with 63 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<2574b3b6a557336992dff4f923fc0870>>
* @generated SignedSource<<1be91c8373db8ffb1155cb6e52beda6c>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -19,6 +19,14 @@ export type MembershipCard_assumeMutation$variables = {
export type MembershipCard_assumeMutation$data = {
readonly assumeOrganizationSession: {
readonly result: {
readonly __typename: "OrganizationSessionCreated";
readonly membership: {
readonly id: string;
readonly lastSession: {
readonly id: string;
} | null | undefined;
};
} | {
readonly __typename: "PasswordRequired";
readonly reason: ReauthenticationReason;
} | {
@@ -46,13 +54,20 @@ var v0 = [
}
],
v1 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
},
v2 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "reason",
"storageKey": null
},
v2 = [
v3 = [
{
"alias": null,
"args": [
@@ -85,7 +100,38 @@ v2 = [
{
"kind": "InlineFragment",
"selections": [
(v1/*: any*/)
{
"alias": null,
"args": null,
"concreteType": "Membership",
"kind": "LinkedField",
"name": "membership",
"plural": false,
"selections": [
(v1/*: any*/),
{
"alias": null,
"args": null,
"concreteType": "Session",
"kind": "LinkedField",
"name": "lastSession",
"plural": false,
"selections": [
(v1/*: any*/)
],
"storageKey": null
}
],
"storageKey": null
}
],
"type": "OrganizationSessionCreated",
"abstractKey": null
},
{
"kind": "InlineFragment",
"selections": [
(v2/*: any*/)
],
"type": "PasswordRequired",
"abstractKey": null
@@ -93,7 +139,7 @@ v2 = [
{
"kind": "InlineFragment",
"selections": [
(v1/*: any*/),
(v2/*: any*/),
{
"alias": null,
"args": null,
@@ -118,7 +164,7 @@ return {
"kind": "Fragment",
"metadata": null,
"name": "MembershipCard_assumeMutation",
"selections": (v2/*: any*/),
"selections": (v3/*: any*/),
"type": "Mutation",
"abstractKey": null
},
@@ -127,19 +173,19 @@ return {
"argumentDefinitions": (v0/*: any*/),
"kind": "Operation",
"name": "MembershipCard_assumeMutation",
"selections": (v2/*: any*/)
"selections": (v3/*: any*/)
},
"params": {
"cacheID": "0d93c6ee32107a4263a910e21597e982",
"cacheID": "100893dbb5b232a19f4b11bc51598bc8",
"id": null,
"metadata": {},
"name": "MembershipCard_assumeMutation",
"operationKind": "mutation",
"text": "mutation MembershipCard_assumeMutation(\n $input: AssumeOrganizationSessionInput!\n) {\n assumeOrganizationSession(input: $input) {\n result {\n __typename\n ... on PasswordRequired {\n reason\n }\n ... on SAMLAuthenticationRequired {\n reason\n redirectUrl\n }\n }\n }\n}\n"
"text": "mutation MembershipCard_assumeMutation(\n $input: AssumeOrganizationSessionInput!\n) {\n assumeOrganizationSession(input: $input) {\n result {\n __typename\n ... on OrganizationSessionCreated {\n membership {\n id\n lastSession {\n id\n }\n }\n }\n ... on PasswordRequired {\n reason\n }\n ... on SAMLAuthenticationRequired {\n reason\n redirectUrl\n }\n }\n }\n}\n"
}
};
})();
(node as any).hash = "aa7a5daec98d5fa51a56da0a7e0b2178";
(node as any).hash = "f44a07beefbecb0a564858272e3cd244";
export default node;

View File

@@ -37,6 +37,14 @@ const assumeOrganizationSessionMutation = graphql`
assumeOrganizationSession(input: $input) {
result {
__typename
... on OrganizationSessionCreated {
membership {
id
lastSession {
id
}
}
}
... on PasswordRequired {
reason
}