Fix request mutations on complete store updates
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
Table,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { type PropsWithChildren, useState } from "react";
|
||||
import { type PropsWithChildren } from "react";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { useLocation, useNavigate, useSearchParams } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
@@ -29,8 +29,13 @@ import type { AuditRowFragment$key } from "./__generated__/AuditRowFragment.grap
|
||||
const requestAccessMutation = graphql`
|
||||
mutation AuditRow_requestAccessMutation($input: RequestReportAccessInput!) {
|
||||
requestReportAccess(input: $input) {
|
||||
trustCenterAccess {
|
||||
id
|
||||
audit {
|
||||
report {
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,7 +56,10 @@ const auditRowFragment = graphql`
|
||||
id
|
||||
filename
|
||||
isUserAuthorized
|
||||
hasUserRequestedAccess
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
framework {
|
||||
id
|
||||
@@ -70,9 +78,7 @@ export function AuditRow(props: { audit: AuditRowFragment$key }) {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const audit = useFragment(auditRowFragment, props.audit);
|
||||
const [hasRequested, setHasRequested] = useState(
|
||||
audit.report?.hasUserRequestedAccess,
|
||||
);
|
||||
const hasRequested = !!audit.report?.access;
|
||||
|
||||
const [requestAccess, isRequestingAccess]
|
||||
= useMutation<AuditRow_requestAccessMutation>(requestAccessMutation);
|
||||
@@ -95,7 +101,6 @@ export function AuditRow(props: { audit: AuditRowFragment$key }) {
|
||||
});
|
||||
return;
|
||||
}
|
||||
setHasRequested(true);
|
||||
toast({
|
||||
title: __("Success"),
|
||||
description: __("Access request submitted successfully."),
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
Spinner,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { useState } from "react";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { useLocation, useNavigate, useSearchParams } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
@@ -26,8 +25,11 @@ const requestAccessMutation = graphql`
|
||||
$input: RequestDocumentAccessInput!
|
||||
) {
|
||||
requestDocumentAccess(input: $input) {
|
||||
trustCenterAccess {
|
||||
id
|
||||
document {
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -46,7 +48,10 @@ const documentRowFragment = graphql`
|
||||
id
|
||||
title
|
||||
isUserAuthorized
|
||||
hasUserRequestedAccess
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -58,9 +63,7 @@ export function DocumentRow(props: { document: DocumentRowFragment$key }) {
|
||||
const [searchParams] = useSearchParams();
|
||||
|
||||
const document = useFragment(documentRowFragment, props.document);
|
||||
const [hasRequested, setHasRequested] = useState(
|
||||
document.hasUserRequestedAccess,
|
||||
);
|
||||
const hasRequested = !!document.access;
|
||||
|
||||
const [requestAccess, isRequestingAccess]
|
||||
= useMutation<DocumentRow_requestAccessMutation>(requestAccessMutation);
|
||||
@@ -83,7 +86,6 @@ export function DocumentRow(props: { document: DocumentRowFragment$key }) {
|
||||
});
|
||||
return;
|
||||
}
|
||||
setHasRequested(true);
|
||||
toast({
|
||||
title: __("Success"),
|
||||
description: __("Access request submitted successfully."),
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from "@probo/ui";
|
||||
import { type PropsWithChildren } from "react";
|
||||
import { useMutation } from "react-relay";
|
||||
import { useNavigate, useSearchParams } from "react-router";
|
||||
import { useLocation, useNavigate, useSearchParams } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
|
||||
import type { TrustGraphCurrentQuery$data } from "#/queries/__generated__/TrustGraphCurrentQuery.graphql";
|
||||
@@ -41,6 +41,7 @@ export function OrganizationSidebar({
|
||||
const theme = useSystemTheme();
|
||||
const [searchParams] = useSearchParams();
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
|
||||
const logoFileUrl = theme === "dark" ? (trustCenter?.darkLogoFileUrl ?? trustCenter?.logoFileUrl) : trustCenter?.logoFileUrl;
|
||||
|
||||
@@ -66,6 +67,8 @@ export function OrganizationSidebar({
|
||||
description: __("Access request submitted successfully."),
|
||||
variant: "success",
|
||||
});
|
||||
|
||||
window.location.href = location.pathname;
|
||||
},
|
||||
onError: (error) => {
|
||||
if (error instanceof UnAuthenticatedError) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import {
|
||||
Spinner,
|
||||
useToast,
|
||||
} from "@probo/ui";
|
||||
import { useState } from "react";
|
||||
import { useFragment, useMutation } from "react-relay";
|
||||
import { useLocation, useNavigate, useSearchParams } from "react-router";
|
||||
import { graphql } from "relay-runtime";
|
||||
@@ -26,8 +25,11 @@ const requestAccessMutation = graphql`
|
||||
$input: RequestTrustCenterFileAccessInput!
|
||||
) {
|
||||
requestTrustCenterFileAccess(input: $input) {
|
||||
trustCenterAccess {
|
||||
id
|
||||
file {
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -48,7 +50,10 @@ const trustCenterFileRowFragment = graphql`
|
||||
id
|
||||
name
|
||||
isUserAuthorized
|
||||
hasUserRequestedAccess
|
||||
access {
|
||||
id
|
||||
status
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -62,7 +67,7 @@ export function TrustCenterFileRow(props: {
|
||||
const navigate = useNavigate();
|
||||
|
||||
const file = useFragment(trustCenterFileRowFragment, props.file);
|
||||
const [hasRequested, setHasRequested] = useState(file.hasUserRequestedAccess);
|
||||
const hasRequested = !!file.access;
|
||||
|
||||
const [requestAccess, isRequestingAccess]
|
||||
= useMutation<TrustCenterFileRow_requestAccessMutation>(
|
||||
@@ -87,7 +92,6 @@ export function TrustCenterFileRow(props: {
|
||||
});
|
||||
return;
|
||||
}
|
||||
setHasRequested(true);
|
||||
toast({
|
||||
title: __("Success"),
|
||||
description: __("Access request submitted successfully."),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<9540bd74ce3b0dd5366c237b56070d9f>>
|
||||
* @generated SignedSource<<beb9130a1b213333ae647116467056a0>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type AuditRowFragment$data = {
|
||||
readonly framework: {
|
||||
@@ -19,8 +20,11 @@ export type AuditRowFragment$data = {
|
||||
};
|
||||
readonly name: string | null | undefined;
|
||||
readonly report: {
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
readonly filename: string;
|
||||
readonly hasUserRequestedAccess: boolean;
|
||||
readonly id: string;
|
||||
readonly isUserAuthorized: boolean;
|
||||
} | null | undefined;
|
||||
@@ -79,8 +83,20 @@ return {
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasUserRequestedAccess",
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v1/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
@@ -119,6 +135,6 @@ return {
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "ebf47a97014ba4dad0da94f2bb01666f";
|
||||
(node as any).hash = "1e3e89368594b05e0926b5ee8bc7c0b5";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<0e5c234b565a3031a774995bff249b97>>
|
||||
* @generated SignedSource<<5439a269fe5c79f6d90f2421fdacb090>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
export type RequestReportAccessInput = {
|
||||
reportId: string;
|
||||
};
|
||||
@@ -17,9 +18,14 @@ export type AuditRow_requestAccessMutation$variables = {
|
||||
};
|
||||
export type AuditRow_requestAccessMutation$data = {
|
||||
readonly requestReportAccess: {
|
||||
readonly trustCenterAccess: {
|
||||
readonly id: string;
|
||||
};
|
||||
readonly audit: {
|
||||
readonly report: {
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
};
|
||||
};
|
||||
export type AuditRow_requestAccessMutation = {
|
||||
@@ -37,48 +43,79 @@ var v0 = [
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "RequestAccessesPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestReportAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TrustCenterAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "trustCenterAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
];
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "AuditRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestReportAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestReportAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Report",
|
||||
"kind": "LinkedField",
|
||||
"name": "report",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
@@ -87,19 +124,56 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "AuditRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestReportAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestReportAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Audit",
|
||||
"kind": "LinkedField",
|
||||
"name": "audit",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Report",
|
||||
"kind": "LinkedField",
|
||||
"name": "report",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
},
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "6760f1ec8a6990f62461c3fab2b2934a",
|
||||
"cacheID": "8d33e98c3b907ff4ddf6d08a0d9e7ff8",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "AuditRow_requestAccessMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation AuditRow_requestAccessMutation(\n $input: RequestReportAccessInput!\n) {\n requestReportAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n"
|
||||
"text": "mutation AuditRow_requestAccessMutation(\n $input: RequestReportAccessInput!\n) {\n requestReportAccess(input: $input) {\n audit {\n report {\n access {\n id\n status\n }\n id\n }\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "6ab5eb701126385e717a381e21e55ae0";
|
||||
(node as any).hash = "01e09978f688128c89698e9a0877fa37";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<396f9d87342c909ca373f60a1e6f7ff3>>
|
||||
* @generated SignedSource<<5698d403c8907dad78a4070f710f46b4>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,9 +9,13 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type DocumentRowFragment$data = {
|
||||
readonly hasUserRequestedAccess: boolean;
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
readonly id: string;
|
||||
readonly isUserAuthorized: boolean;
|
||||
readonly title: string;
|
||||
@@ -22,19 +26,21 @@ export type DocumentRowFragment$key = {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"DocumentRowFragment">;
|
||||
};
|
||||
|
||||
const node: ReaderFragment = {
|
||||
const node: ReaderFragment = (function(){
|
||||
var v0 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "DocumentRowFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -52,15 +58,28 @@ const node: ReaderFragment = {
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasUserRequestedAccess",
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Document",
|
||||
"abstractKey": null
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "1b0f0b9cae621268d72b0fd0646aa672";
|
||||
(node as any).hash = "6839ab4ad70d571dcce4e74583723244";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<e62c28d53365ca5d5f3d53282aefd4e7>>
|
||||
* @generated SignedSource<<b24d17465cf3d4aca2ade3fbd21326eb>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
export type RequestDocumentAccessInput = {
|
||||
documentId: string;
|
||||
};
|
||||
@@ -17,9 +18,12 @@ export type DocumentRow_requestAccessMutation$variables = {
|
||||
};
|
||||
export type DocumentRow_requestAccessMutation$data = {
|
||||
readonly requestDocumentAccess: {
|
||||
readonly trustCenterAccess: {
|
||||
readonly id: string;
|
||||
};
|
||||
readonly document: {
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
};
|
||||
};
|
||||
export type DocumentRow_requestAccessMutation = {
|
||||
@@ -37,48 +41,68 @@ var v0 = [
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "RequestAccessesPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestDocumentAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TrustCenterAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "trustCenterAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
];
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "DocumentRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestDocumentAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestDocumentAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Document",
|
||||
"kind": "LinkedField",
|
||||
"name": "document",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
@@ -87,19 +111,44 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "DocumentRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestDocumentAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestDocumentAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "Document",
|
||||
"kind": "LinkedField",
|
||||
"name": "document",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "13715b7cb8784d050b6d0381e460bbad",
|
||||
"cacheID": "0bd652390e5413f5ba2c66af0796cbc9",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "DocumentRow_requestAccessMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation DocumentRow_requestAccessMutation(\n $input: RequestDocumentAccessInput!\n) {\n requestDocumentAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n"
|
||||
"text": "mutation DocumentRow_requestAccessMutation(\n $input: RequestDocumentAccessInput!\n) {\n requestDocumentAccess(input: $input) {\n document {\n access {\n id\n status\n }\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "ca9026b04c2de91067759e3a80e5c276";
|
||||
(node as any).hash = "bc8897aa5c4a7d7fb05604f8aa3b8491";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<0261adc72d21035b906b6156ea9d0b40>>
|
||||
* @generated SignedSource<<bd09e92db1b1b5bf9c45145f4058e88f>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,9 +9,13 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ReaderFragment } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
import { FragmentRefs } from "relay-runtime";
|
||||
export type TrustCenterFileRowFragment$data = {
|
||||
readonly hasUserRequestedAccess: boolean;
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
readonly id: string;
|
||||
readonly isUserAuthorized: boolean;
|
||||
readonly name: string;
|
||||
@@ -22,19 +26,21 @@ export type TrustCenterFileRowFragment$key = {
|
||||
readonly " $fragmentSpreads": FragmentRefs<"TrustCenterFileRowFragment">;
|
||||
};
|
||||
|
||||
const node: ReaderFragment = {
|
||||
const node: ReaderFragment = (function(){
|
||||
var v0 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "TrustCenterFileRowFragment",
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
@@ -52,15 +58,28 @@ const node: ReaderFragment = {
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "hasUserRequestedAccess",
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v0/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "TrustCenterFile",
|
||||
"abstractKey": null
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "4ff11c14e65566f0dfe3a77ea73903e8";
|
||||
(node as any).hash = "98e5e399ab6d45c22cd85d663cfb3748";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<a8da5aa24d8696b55231f44d861f347c>>
|
||||
* @generated SignedSource<<19d9adae53e45d4399358c9307928265>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,6 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type DocumentAccessStatus = "GRANTED" | "REJECTED" | "REQUESTED" | "REVOKED";
|
||||
export type RequestTrustCenterFileAccessInput = {
|
||||
trustCenterFileId: string;
|
||||
};
|
||||
@@ -17,9 +18,12 @@ export type TrustCenterFileRow_requestAccessMutation$variables = {
|
||||
};
|
||||
export type TrustCenterFileRow_requestAccessMutation$data = {
|
||||
readonly requestTrustCenterFileAccess: {
|
||||
readonly trustCenterAccess: {
|
||||
readonly id: string;
|
||||
};
|
||||
readonly file: {
|
||||
readonly access: {
|
||||
readonly id: string;
|
||||
readonly status: DocumentAccessStatus;
|
||||
} | null | undefined;
|
||||
} | null | undefined;
|
||||
};
|
||||
};
|
||||
export type TrustCenterFileRow_requestAccessMutation = {
|
||||
@@ -37,48 +41,68 @@ var v0 = [
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"concreteType": "RequestAccessesPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestTrustCenterFileAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TrustCenterAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "trustCenterAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
];
|
||||
],
|
||||
v2 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "id",
|
||||
"storageKey": null
|
||||
},
|
||||
v3 = {
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "DocumentAccess",
|
||||
"kind": "LinkedField",
|
||||
"name": "access",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v2/*: any*/),
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"kind": "ScalarField",
|
||||
"name": "status",
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
};
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "TrustCenterFileRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestFileAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestTrustCenterFileAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TrustCenterFile",
|
||||
"kind": "LinkedField",
|
||||
"name": "file",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
@@ -87,19 +111,44 @@ return {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"kind": "Operation",
|
||||
"name": "TrustCenterFileRow_requestAccessMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": (v1/*: any*/),
|
||||
"concreteType": "RequestFileAccessPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "requestTrustCenterFileAccess",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
{
|
||||
"alias": null,
|
||||
"args": null,
|
||||
"concreteType": "TrustCenterFile",
|
||||
"kind": "LinkedField",
|
||||
"name": "file",
|
||||
"plural": false,
|
||||
"selections": [
|
||||
(v3/*: any*/),
|
||||
(v2/*: any*/)
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
],
|
||||
"storageKey": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "77a09810aa9c3ddf3a3baddf709f9a42",
|
||||
"cacheID": "f96fd0464a34ad565cc7b6bb2e13308f",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "TrustCenterFileRow_requestAccessMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation TrustCenterFileRow_requestAccessMutation(\n $input: RequestTrustCenterFileAccessInput!\n) {\n requestTrustCenterFileAccess(input: $input) {\n trustCenterAccess {\n id\n }\n }\n}\n"
|
||||
"text": "mutation TrustCenterFileRow_requestAccessMutation(\n $input: RequestTrustCenterFileAccessInput!\n) {\n requestTrustCenterFileAccess(input: $input) {\n file {\n access {\n id\n status\n }\n id\n }\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "eba04489de9ec18ab9816328a481ef33";
|
||||
(node as any).hash = "1a9f7ac6860d4bca88d04d73f9c6020d";
|
||||
|
||||
export default node;
|
||||
|
||||
Reference in New Issue
Block a user