Update obligations

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-09-23 14:02:18 +02:00
parent c54051dd8a
commit 98d7e7b7b9
39 changed files with 3746 additions and 394 deletions

View File

@@ -2,7 +2,7 @@ import { graphql } from "relay-runtime";
import { useMutation } from "react-relay";
import { useConfirm } from "@probo/ui";
import { useTranslate } from "@probo/i18n";
import { promisifyMutation, sprintf } from "@probo/helpers";
import { promisifyMutation } from "@probo/helpers";
import { useMutationWithToasts } from "../useMutationWithToasts";
export const ObligationsConnectionKey = "ObligationsPage_obligations";
@@ -24,7 +24,6 @@ export const obligationNodeQuery = graphql`
id
snapshotId
sourceId
referenceId
area
source
requirement
@@ -57,7 +56,6 @@ export const createObligationMutation = graphql`
obligationEdge @prependEdge(connections: $connections) {
node {
id
referenceId
area
source
requirement
@@ -82,7 +80,6 @@ export const updateObligationMutation = graphql`
updateObligation(input: $input) {
obligation {
id
referenceId
area
source
requirement
@@ -113,7 +110,7 @@ export const deleteObligationMutation = graphql`
`;
export const useDeleteObligation = (
obligation: { id: string; referenceId: string },
obligation: { id: string },
connectionId: string
) => {
const { __ } = useTranslate();
@@ -135,11 +132,8 @@ export const useDeleteObligation = (
},
}),
{
message: sprintf(
__(
"This will permanently delete the obligation %s. This action cannot be undone."
),
obligation.referenceId
message: __(
"This will permanently delete this obligation. This action cannot be undone."
),
}
);
@@ -152,7 +146,6 @@ export const useCreateObligation = (connectionId: string) => {
return (input: {
organizationId: string;
referenceId: string;
area?: string;
source?: string;
requirement?: string;
@@ -166,9 +159,6 @@ export const useCreateObligation = (connectionId: string) => {
if (!input.organizationId) {
return alert(__("Failed to create obligation: organization is required"));
}
if (!input.referenceId) {
return alert(__("Failed to create obligation: reference ID is required"));
}
if (!input.ownerId) {
return alert(__("Failed to create obligation: owner is required"));
}
@@ -177,7 +167,6 @@ export const useCreateObligation = (connectionId: string) => {
variables: {
input: {
organizationId: input.organizationId,
referenceId: input.referenceId,
area: input.area,
source: input.source,
requirement: input.requirement,
@@ -186,7 +175,7 @@ export const useCreateObligation = (connectionId: string) => {
ownerId: input.ownerId,
lastReviewDate: input.lastReviewDate,
dueDate: input.dueDate,
status: input.status || "OPEN",
status: input.status || "NON_COMPLIANT",
},
connections: [connectionId],
},
@@ -200,7 +189,6 @@ export const useUpdateObligation = () => {
return (input: {
id: string;
referenceId?: string;
area?: string;
source?: string;
requirement?: string;

View File

@@ -125,11 +125,15 @@ export const riskNodeQuery = graphql`
controlsInfo: controls(first: 0) {
totalCount
}
obligationsInfo: obligations(first: 0) {
totalCount
}
...useRiskFormFragment
...RiskOverviewTabFragment
...RiskMeasuresTabFragment
...RiskDocumentsTabFragment
...RiskControlsTabFragment
...RiskObligationsTabFragment
}
}
}

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<0d77e4f7fb508d1c181575a45f0938d6>>
* @generated SignedSource<<6c659dc34af3bc7107a55d45f49075b5>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -9,7 +9,7 @@
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type ObligationStatus = "CLOSED" | "IN_PROGRESS" | "OPEN";
export type ObligationStatus = "COMPLIANT" | "NON_COMPLIANT" | "PARTIALLY_COMPLIANT";
export type CreateObligationInput = {
actionsToBeImplemented?: string | null | undefined;
area?: string | null | undefined;
@@ -17,7 +17,6 @@ export type CreateObligationInput = {
lastReviewDate?: any | null | undefined;
organizationId: string;
ownerId: string;
referenceId: string;
regulator?: string | null | undefined;
requirement?: string | null | undefined;
source?: string | null | undefined;
@@ -41,7 +40,6 @@ export type ObligationGraphCreateMutation$data = {
readonly fullName: string;
readonly id: string;
};
readonly referenceId: string;
readonly regulator: string | null | undefined;
readonly requirement: string | null | undefined;
readonly source: string | null | undefined;
@@ -97,13 +95,6 @@ v4 = {
"plural": false,
"selections": [
(v3/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "referenceId",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -258,16 +249,16 @@ return {
]
},
"params": {
"cacheID": "8b01fc75c0c24f32a7892b7b8e38be72",
"cacheID": "76eae037102523c7378b07856332c9ff",
"id": null,
"metadata": {},
"name": "ObligationGraphCreateMutation",
"operationKind": "mutation",
"text": "mutation ObligationGraphCreateMutation(\n $input: CreateObligationInput!\n) {\n createObligation(input: $input) {\n obligationEdge {\n node {\n id\n referenceId\n area\n source\n requirement\n actionsToBeImplemented\n regulator\n lastReviewDate\n dueDate\n status\n owner {\n id\n fullName\n }\n createdAt\n }\n }\n }\n}\n"
"text": "mutation ObligationGraphCreateMutation(\n $input: CreateObligationInput!\n) {\n createObligation(input: $input) {\n obligationEdge {\n node {\n id\n area\n source\n requirement\n actionsToBeImplemented\n regulator\n lastReviewDate\n dueDate\n status\n owner {\n id\n fullName\n }\n createdAt\n }\n }\n }\n}\n"
}
};
})();
(node as any).hash = "67433dcbb82e3abbde25e2a8105c2789";
(node as any).hash = "f3d8ddbef3566e26b3fe65543d93d07d";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<7d2959d10f1bc8e80f8ab1d1ea4cb45f>>
* @generated SignedSource<<ae81a1ead15cdd5a41e897bcd60cd38b>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -176,13 +176,6 @@ return {
"name": "sourceId",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "referenceId",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -347,12 +340,12 @@ return {
]
},
"params": {
"cacheID": "1d94cb0e6a84428954ab8402ed2ca0ef",
"cacheID": "761aab4336741b33cc256ec5527011e4",
"id": null,
"metadata": {},
"name": "ObligationGraphListQuery",
"operationKind": "query",
"text": "query ObligationGraphListQuery(\n $organizationId: ID!\n $snapshotId: ID\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n ...ObligationsPageFragment_3iomuz\n }\n id\n }\n}\n\nfragment ObligationsPageFragment_3iomuz on Organization {\n id\n obligations(first: 10, filter: {snapshotId: $snapshotId}) {\n totalCount\n edges {\n node {\n id\n snapshotId\n sourceId\n referenceId\n area\n source\n requirement\n status\n lastReviewDate\n dueDate\n actionsToBeImplemented\n regulator\n owner {\n id\n fullName\n }\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n}\n"
"text": "query ObligationGraphListQuery(\n $organizationId: ID!\n $snapshotId: ID\n) {\n node(id: $organizationId) {\n __typename\n ... on Organization {\n ...ObligationsPageFragment_3iomuz\n }\n id\n }\n}\n\nfragment ObligationsPageFragment_3iomuz on Organization {\n id\n obligations(first: 10, filter: {snapshotId: $snapshotId}) {\n totalCount\n edges {\n node {\n id\n snapshotId\n sourceId\n area\n source\n requirement\n status\n lastReviewDate\n dueDate\n actionsToBeImplemented\n regulator\n owner {\n id\n fullName\n }\n createdAt\n updatedAt\n __typename\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n}\n"
}
};
})();

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<dcd6c4da574c7104ae239d1da692f71a>>
* @generated SignedSource<<d1b09bb9cf9c608b8b3ac1c2b55a109a>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -9,7 +9,7 @@
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type ObligationStatus = "CLOSED" | "IN_PROGRESS" | "OPEN";
export type ObligationStatus = "COMPLIANT" | "NON_COMPLIANT" | "PARTIALLY_COMPLIANT";
export type ObligationGraphNodeQuery$variables = {
obligationId: string;
};
@@ -29,7 +29,6 @@ export type ObligationGraphNodeQuery$data = {
readonly fullName: string;
readonly id: string;
};
readonly referenceId?: string;
readonly regulator?: string | null | undefined;
readonly requirement?: string | null | undefined;
readonly snapshotId?: string | null | undefined;
@@ -84,66 +83,59 @@ v5 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "referenceId",
"name": "area",
"storageKey": null
},
v6 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "area",
"name": "source",
"storageKey": null
},
v7 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "source",
"name": "requirement",
"storageKey": null
},
v8 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "requirement",
"name": "actionsToBeImplemented",
"storageKey": null
},
v9 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "actionsToBeImplemented",
"name": "regulator",
"storageKey": null
},
v10 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "regulator",
"name": "lastReviewDate",
"storageKey": null
},
v11 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "lastReviewDate",
"name": "dueDate",
"storageKey": null
},
v12 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "dueDate",
"storageKey": null
},
v13 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "status",
"storageKey": null
},
v14 = {
v13 = {
"alias": null,
"args": null,
"concreteType": "People",
@@ -162,7 +154,7 @@ v14 = {
],
"storageKey": null
},
v15 = {
v14 = {
"alias": null,
"args": null,
"concreteType": "Organization",
@@ -181,14 +173,14 @@ v15 = {
],
"storageKey": null
},
v16 = {
v15 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "createdAt",
"storageKey": null
},
v17 = {
v16 = {
"alias": null,
"args": null,
"kind": "ScalarField",
@@ -227,8 +219,7 @@ return {
(v13/*: any*/),
(v14/*: any*/),
(v15/*: any*/),
(v16/*: any*/),
(v17/*: any*/)
(v16/*: any*/)
],
"type": "Obligation",
"abstractKey": null
@@ -278,8 +269,7 @@ return {
(v13/*: any*/),
(v14/*: any*/),
(v15/*: any*/),
(v16/*: any*/),
(v17/*: any*/)
(v16/*: any*/)
],
"type": "Obligation",
"abstractKey": null
@@ -290,16 +280,16 @@ return {
]
},
"params": {
"cacheID": "1cc13435272f22a8167b370cca105184",
"cacheID": "6fd1c9d6e9f9a5baa60e4d270fc16db7",
"id": null,
"metadata": {},
"name": "ObligationGraphNodeQuery",
"operationKind": "query",
"text": "query ObligationGraphNodeQuery(\n $obligationId: ID!\n) {\n node(id: $obligationId) {\n __typename\n ... on Obligation {\n id\n snapshotId\n sourceId\n referenceId\n area\n source\n requirement\n actionsToBeImplemented\n regulator\n lastReviewDate\n dueDate\n status\n owner {\n id\n fullName\n }\n organization {\n id\n name\n }\n createdAt\n updatedAt\n }\n id\n }\n}\n"
"text": "query ObligationGraphNodeQuery(\n $obligationId: ID!\n) {\n node(id: $obligationId) {\n __typename\n ... on Obligation {\n id\n snapshotId\n sourceId\n area\n source\n requirement\n actionsToBeImplemented\n regulator\n lastReviewDate\n dueDate\n status\n owner {\n id\n fullName\n }\n organization {\n id\n name\n }\n createdAt\n updatedAt\n }\n id\n }\n}\n"
}
};
})();
(node as any).hash = "f7c98b6669bae79c42892dd296e9dd07";
(node as any).hash = "ddefa1f2514f429a8ff174646bccf254";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<7978f1bb5fdbb6129f0e6217574af621>>
* @generated SignedSource<<2fb713ad39d2976a25e4fee57edec2f3>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -9,7 +9,7 @@
// @ts-nocheck
import { ConcreteRequest } from 'relay-runtime';
export type ObligationStatus = "CLOSED" | "IN_PROGRESS" | "OPEN";
export type ObligationStatus = "COMPLIANT" | "NON_COMPLIANT" | "PARTIALLY_COMPLIANT";
export type UpdateObligationInput = {
actionsToBeImplemented?: string | null | undefined;
area?: string | null | undefined;
@@ -17,7 +17,6 @@ export type UpdateObligationInput = {
id: string;
lastReviewDate?: any | null | undefined;
ownerId?: string | null | undefined;
referenceId?: string | null | undefined;
regulator?: string | null | undefined;
requirement?: string | null | undefined;
source?: string | null | undefined;
@@ -38,7 +37,6 @@ export type ObligationGraphUpdateMutation$data = {
readonly fullName: string;
readonly id: string;
};
readonly referenceId: string;
readonly regulator: string | null | undefined;
readonly requirement: string | null | undefined;
readonly source: string | null | undefined;
@@ -91,13 +89,6 @@ v2 = [
"plural": false,
"selections": [
(v1/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "referenceId",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -205,16 +196,16 @@ return {
"selections": (v2/*: any*/)
},
"params": {
"cacheID": "f3f7c1657e914067e7543bf98c91c2d0",
"cacheID": "e42654b0cfd6ebeb8c78e8ec2f62c9c7",
"id": null,
"metadata": {},
"name": "ObligationGraphUpdateMutation",
"operationKind": "mutation",
"text": "mutation ObligationGraphUpdateMutation(\n $input: UpdateObligationInput!\n) {\n updateObligation(input: $input) {\n obligation {\n id\n referenceId\n area\n source\n requirement\n actionsToBeImplemented\n regulator\n lastReviewDate\n dueDate\n status\n owner {\n id\n fullName\n }\n updatedAt\n }\n }\n}\n"
"text": "mutation ObligationGraphUpdateMutation(\n $input: UpdateObligationInput!\n) {\n updateObligation(input: $input) {\n obligation {\n id\n area\n source\n requirement\n actionsToBeImplemented\n regulator\n lastReviewDate\n dueDate\n status\n owner {\n id\n fullName\n }\n updatedAt\n }\n }\n}\n"
}
};
})();
(node as any).hash = "4de068d83b83280ea680aad303c84098";
(node as any).hash = "68013ca15f0e4eaaa0b1ef877b4f528c";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<9abcf06eed9cb70f62b2aed2b907e9e5>>
* @generated SignedSource<<f3eadb5ecfeb7b2304712f74b6ac8863>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -30,6 +30,9 @@ export type RiskGraphNodeQuery$data = {
};
readonly name?: string;
readonly note?: string;
readonly obligationsInfo?: {
readonly totalCount: number;
};
readonly owner?: {
readonly fullName: string;
readonly id: string;
@@ -37,7 +40,7 @@ export type RiskGraphNodeQuery$data = {
readonly residualRiskScore?: number;
readonly snapshotId?: string | null | undefined;
readonly treatment?: RiskTreatment;
readonly " $fragmentSpreads": FragmentRefs<"RiskControlsTabFragment" | "RiskDocumentsTabFragment" | "RiskMeasuresTabFragment" | "RiskOverviewTabFragment" | "useRiskFormFragment">;
readonly " $fragmentSpreads": FragmentRefs<"RiskControlsTabFragment" | "RiskDocumentsTabFragment" | "RiskMeasuresTabFragment" | "RiskObligationsTabFragment" | "RiskOverviewTabFragment" | "useRiskFormFragment">;
};
};
export type RiskGraphNodeQuery = {
@@ -96,6 +99,13 @@ v6 = {
"storageKey": null
},
v7 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "fullName",
"storageKey": null
},
v8 = {
"alias": null,
"args": null,
"concreteType": "People",
@@ -104,45 +114,39 @@ v7 = {
"plural": false,
"selections": [
(v2/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "fullName",
"storageKey": null
}
(v7/*: any*/)
],
"storageKey": null
},
v8 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "note",
"storageKey": null
},
v9 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "inherentRiskScore",
"name": "note",
"storageKey": null
},
v10 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "inherentRiskScore",
"storageKey": null
},
v11 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "residualRiskScore",
"storageKey": null
},
v11 = [
v12 = [
{
"kind": "Literal",
"name": "first",
"value": 0
}
],
v12 = [
v13 = [
{
"alias": null,
"args": null,
@@ -151,72 +155,82 @@ v12 = [
"storageKey": null
}
],
v13 = {
v14 = {
"alias": "measuresInfo",
"args": (v11/*: any*/),
"args": (v12/*: any*/),
"concreteType": "MeasureConnection",
"kind": "LinkedField",
"name": "measures",
"plural": false,
"selections": (v12/*: any*/),
"selections": (v13/*: any*/),
"storageKey": "measures(first:0)"
},
v14 = {
v15 = {
"alias": "documentsInfo",
"args": (v11/*: any*/),
"args": (v12/*: any*/),
"concreteType": "DocumentConnection",
"kind": "LinkedField",
"name": "documents",
"plural": false,
"selections": (v12/*: any*/),
"selections": (v13/*: any*/),
"storageKey": "documents(first:0)"
},
v15 = {
v16 = {
"alias": "controlsInfo",
"args": (v11/*: any*/),
"args": (v12/*: any*/),
"concreteType": "ControlConnection",
"kind": "LinkedField",
"name": "controls",
"plural": false,
"selections": (v12/*: any*/),
"selections": (v13/*: any*/),
"storageKey": "controls(first:0)"
},
v16 = {
v17 = {
"alias": "obligationsInfo",
"args": (v12/*: any*/),
"concreteType": "ObligationConnection",
"kind": "LinkedField",
"name": "obligations",
"plural": false,
"selections": (v13/*: any*/),
"storageKey": "obligations(first:0)"
},
v18 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "__typename",
"storageKey": null
},
v17 = [
v19 = [
{
"kind": "Literal",
"name": "first",
"value": 100
}
],
v18 = {
v20 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "cursor",
"storageKey": null
},
v19 = {
v21 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "endCursor",
"storageKey": null
},
v20 = {
v22 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "hasNextPage",
"storageKey": null
},
v21 = {
v23 = {
"alias": null,
"args": null,
"concreteType": "PageInfo",
@@ -224,12 +238,12 @@ v21 = {
"name": "pageInfo",
"plural": false,
"selections": [
(v19/*: any*/),
(v20/*: any*/)
(v21/*: any*/),
(v22/*: any*/)
],
"storageKey": null
},
v22 = {
v24 = {
"kind": "ClientExtension",
"selections": [
{
@@ -241,7 +255,14 @@ v22 = {
}
]
},
v23 = [
v25 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "status",
"storageKey": null
},
v26 = [
{
"kind": "Literal",
"name": "first",
@@ -271,13 +292,14 @@ return {
(v4/*: any*/),
(v5/*: any*/),
(v6/*: any*/),
(v7/*: any*/),
(v8/*: any*/),
(v9/*: any*/),
(v10/*: any*/),
(v13/*: any*/),
(v11/*: any*/),
(v14/*: any*/),
(v15/*: any*/),
(v16/*: any*/),
(v17/*: any*/),
{
"args": null,
"kind": "FragmentSpread",
@@ -302,6 +324,11 @@ return {
"args": null,
"kind": "FragmentSpread",
"name": "RiskControlsTabFragment"
},
{
"args": null,
"kind": "FragmentSpread",
"name": "RiskObligationsTabFragment"
}
],
"type": "Risk",
@@ -328,7 +355,7 @@ return {
"name": "node",
"plural": false,
"selections": [
(v16/*: any*/),
(v18/*: any*/),
(v2/*: any*/),
{
"kind": "InlineFragment",
@@ -337,13 +364,14 @@ return {
(v4/*: any*/),
(v5/*: any*/),
(v6/*: any*/),
(v7/*: any*/),
(v8/*: any*/),
(v9/*: any*/),
(v10/*: any*/),
(v13/*: any*/),
(v11/*: any*/),
(v14/*: any*/),
(v15/*: any*/),
(v16/*: any*/),
(v17/*: any*/),
{
"alias": null,
"args": null,
@@ -381,7 +409,7 @@ return {
},
{
"alias": null,
"args": (v17/*: any*/),
"args": (v19/*: any*/),
"concreteType": "MeasureConnection",
"kind": "LinkedField",
"name": "measures",
@@ -412,22 +440,22 @@ return {
"name": "state",
"storageKey": null
},
(v16/*: any*/)
(v18/*: any*/)
],
"storageKey": null
},
(v18/*: any*/)
(v20/*: any*/)
],
"storageKey": null
},
(v21/*: any*/),
(v22/*: any*/)
(v23/*: any*/),
(v24/*: any*/)
],
"storageKey": "measures(first:100)"
},
{
"alias": null,
"args": (v17/*: any*/),
"args": (v19/*: any*/),
"filters": null,
"handle": "connection",
"key": "Risk__measures",
@@ -436,7 +464,7 @@ return {
},
{
"alias": null,
"args": (v17/*: any*/),
"args": (v19/*: any*/),
"concreteType": "DocumentConnection",
"kind": "LinkedField",
"name": "documents",
@@ -511,13 +539,7 @@ return {
"plural": false,
"selections": [
(v2/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "status",
"storageKey": null
}
(v25/*: any*/)
],
"storageKey": null
}
@@ -527,22 +549,22 @@ return {
],
"storageKey": "versions(first:1)"
},
(v16/*: any*/)
(v18/*: any*/)
],
"storageKey": null
},
(v18/*: any*/)
(v20/*: any*/)
],
"storageKey": null
},
(v21/*: any*/),
(v22/*: any*/)
(v23/*: any*/),
(v24/*: any*/)
],
"storageKey": "documents(first:100)"
},
{
"alias": null,
"args": (v17/*: any*/),
"args": (v19/*: any*/),
"filters": null,
"handle": "connection",
"key": "Risk__documents",
@@ -551,7 +573,7 @@ return {
},
{
"alias": null,
"args": (v23/*: any*/),
"args": (v26/*: any*/),
"concreteType": "ControlConnection",
"kind": "LinkedField",
"name": "controls",
@@ -595,11 +617,11 @@ return {
],
"storageKey": null
},
(v16/*: any*/)
(v18/*: any*/)
],
"storageKey": null
},
(v18/*: any*/)
(v20/*: any*/)
],
"storageKey": null
},
@@ -611,8 +633,8 @@ return {
"name": "pageInfo",
"plural": false,
"selections": [
(v19/*: any*/),
(v20/*: any*/),
(v21/*: any*/),
(v22/*: any*/),
{
"alias": null,
"args": null,
@@ -635,7 +657,7 @@ return {
},
{
"alias": null,
"args": (v23/*: any*/),
"args": (v26/*: any*/),
"filters": [
"orderBy",
"filter"
@@ -644,6 +666,88 @@ return {
"key": "RiskControlsTab_controls",
"kind": "LinkedHandle",
"name": "controls"
},
{
"alias": null,
"args": (v19/*: any*/),
"concreteType": "ObligationConnection",
"kind": "LinkedField",
"name": "obligations",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "ObligationEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "Obligation",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v2/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "requirement",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "area",
"storageKey": null
},
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "source",
"storageKey": null
},
(v25/*: any*/),
{
"alias": null,
"args": null,
"concreteType": "People",
"kind": "LinkedField",
"name": "owner",
"plural": false,
"selections": [
(v7/*: any*/),
(v2/*: any*/)
],
"storageKey": null
},
(v18/*: any*/)
],
"storageKey": null
},
(v20/*: any*/)
],
"storageKey": null
},
(v23/*: any*/),
(v24/*: any*/)
],
"storageKey": "obligations(first:100)"
},
{
"alias": null,
"args": (v19/*: any*/),
"filters": null,
"handle": "connection",
"key": "Risk__obligations",
"kind": "LinkedHandle",
"name": "obligations"
}
],
"type": "Risk",
@@ -655,16 +759,16 @@ return {
]
},
"params": {
"cacheID": "c3d393180d6273b2e910c7ebffb75df7",
"cacheID": "a909af9427061d9e06e22798cbe1ba14",
"id": null,
"metadata": {},
"name": "RiskGraphNodeQuery",
"operationKind": "query",
"text": "query RiskGraphNodeQuery(\n $riskId: ID!\n) {\n node(id: $riskId) {\n __typename\n ... on Risk {\n id\n snapshotId\n name\n description\n treatment\n owner {\n id\n fullName\n }\n note\n inherentRiskScore\n residualRiskScore\n measuresInfo: measures(first: 0) {\n totalCount\n }\n documentsInfo: documents(first: 0) {\n totalCount\n }\n controlsInfo: controls(first: 0) {\n totalCount\n }\n ...useRiskFormFragment\n ...RiskOverviewTabFragment\n ...RiskMeasuresTabFragment\n ...RiskDocumentsTabFragment\n ...RiskControlsTabFragment\n }\n id\n }\n}\n\nfragment LinkedDocumentsCardFragment on Document {\n id\n title\n createdAt\n documentType\n versions(first: 1) {\n edges {\n node {\n id\n status\n }\n }\n }\n}\n\nfragment LinkedMeasuresCardFragment on Measure {\n id\n name\n state\n}\n\nfragment RiskControlsTabFragment on Risk {\n id\n controls(first: 20) {\n edges {\n node {\n id\n sectionTitle\n name\n framework {\n id\n name\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment RiskDocumentsTabFragment on Risk {\n id\n documents(first: 100) {\n edges {\n node {\n id\n ...LinkedDocumentsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment RiskMeasuresTabFragment on Risk {\n id\n measures(first: 100) {\n edges {\n node {\n id\n ...LinkedMeasuresCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment RiskOverviewTabFragment on Risk {\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n inherentRiskScore\n residualRiskScore\n}\n\nfragment useRiskFormFragment on Risk {\n id\n name\n category\n description\n treatment\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n inherentRiskScore\n residualRiskScore\n note\n owner {\n id\n }\n}\n"
"text": "query RiskGraphNodeQuery(\n $riskId: ID!\n) {\n node(id: $riskId) {\n __typename\n ... on Risk {\n id\n snapshotId\n name\n description\n treatment\n owner {\n id\n fullName\n }\n note\n inherentRiskScore\n residualRiskScore\n measuresInfo: measures(first: 0) {\n totalCount\n }\n documentsInfo: documents(first: 0) {\n totalCount\n }\n controlsInfo: controls(first: 0) {\n totalCount\n }\n obligationsInfo: obligations(first: 0) {\n totalCount\n }\n ...useRiskFormFragment\n ...RiskOverviewTabFragment\n ...RiskMeasuresTabFragment\n ...RiskDocumentsTabFragment\n ...RiskControlsTabFragment\n ...RiskObligationsTabFragment\n }\n id\n }\n}\n\nfragment LinkedDocumentsCardFragment on Document {\n id\n title\n createdAt\n documentType\n versions(first: 1) {\n edges {\n node {\n id\n status\n }\n }\n }\n}\n\nfragment LinkedMeasuresCardFragment on Measure {\n id\n name\n state\n}\n\nfragment LinkedObligationsCardFragment on Obligation {\n id\n requirement\n area\n source\n status\n owner {\n fullName\n id\n }\n}\n\nfragment RiskControlsTabFragment on Risk {\n id\n controls(first: 20) {\n edges {\n node {\n id\n sectionTitle\n name\n framework {\n id\n name\n }\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n}\n\nfragment RiskDocumentsTabFragment on Risk {\n id\n documents(first: 100) {\n edges {\n node {\n id\n ...LinkedDocumentsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment RiskMeasuresTabFragment on Risk {\n id\n measures(first: 100) {\n edges {\n node {\n id\n ...LinkedMeasuresCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment RiskObligationsTabFragment on Risk {\n id\n obligations(first: 100) {\n edges {\n node {\n id\n ...LinkedObligationsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n}\n\nfragment RiskOverviewTabFragment on Risk {\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n inherentRiskScore\n residualRiskScore\n}\n\nfragment useRiskFormFragment on Risk {\n id\n name\n category\n description\n treatment\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n inherentRiskScore\n residualRiskScore\n note\n owner {\n id\n }\n}\n"
}
};
})();
(node as any).hash = "43dcdf60f1d1b28414650fe5f9294faa";
(node as any).hash = "f173ffcac7b82f1b62394cb74d1a78ee";
export default node;