Add risk snapshots

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-09-02 18:52:07 +02:00
parent 781026d3e7
commit 16ced9638d
22 changed files with 639 additions and 253 deletions

View File

@@ -31,10 +31,10 @@ export function useDeleteRiskMutation() {
}
export const risksQuery = graphql`
query RiskGraphListQuery($organizationId: ID!) {
query RiskGraphListQuery($organizationId: ID!, $snapshotId: ID) {
organization: node(id: $organizationId) {
id
...RiskGraphFragment
...RiskGraphFragment @arguments(snapshotId: $snapshotId)
}
}
`;
@@ -48,6 +48,7 @@ const risksFragment = graphql`
after: { type: "CursorKey", defaultValue: null }
before: { type: "CursorKey", defaultValue: null }
last: { type: "Int", defaultValue: null }
snapshotId: { type: "ID", defaultValue: null }
) {
risks(
first: $first
@@ -55,10 +56,12 @@ const risksFragment = graphql`
last: $last
before: $before
orderBy: $order
) @connection(key: "RisksListQuery_risks") {
filter: { snapshotId: $snapshotId }
) @connection(key: "RisksListQuery_risks", filters: ["filter"]) {
edges {
node {
id
snapshotId
name
category
treatment
@@ -77,7 +80,7 @@ const risksFragment = graphql`
export const RisksConnectionKey = "RisksListQuery_risks";
export function useRisksQuery(queryRef: PreloadedQuery<RiskGraphListQuery>) {
export function useRisksQuery(queryRef: PreloadedQuery<RiskGraphListQuery>, snapshotId?: string | null) {
const data = usePreloadedQuery(risksQuery, queryRef);
const [dataFragment, refetch] = useRefetchableFragment(
risksFragment,
@@ -90,6 +93,7 @@ export function useRisksQuery(queryRef: PreloadedQuery<RiskGraphListQuery>) {
connectionId: ConnectionHandler.getConnectionID(
data.organization.id,
RisksConnectionKey,
{ filter: { snapshotId: snapshotId || null } }
),
};
}
@@ -98,6 +102,8 @@ export const riskNodeQuery = graphql`
query RiskGraphNodeQuery($riskId: ID!) {
node(id: $riskId) {
... on Risk {
id
snapshotId
name
description
treatment

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<d65dc38bcf11079a304f8a5cc4070389>>
* @generated SignedSource<<2b964bdee12b49230932678f583c7401>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -25,6 +25,7 @@ export type RiskGraphFragment$data = {
readonly residualImpact: number;
readonly residualLikelihood: number;
readonly residualRiskScore: number;
readonly snapshotId: string | null | undefined;
readonly treatment: RiskTreatment;
readonly " $fragmentSpreads": FragmentRefs<"useRiskFormFragment">;
};
@@ -76,6 +77,11 @@ return {
"defaultValue": null,
"kind": "LocalArgument",
"name": "order"
},
{
"defaultValue": null,
"kind": "LocalArgument",
"name": "snapshotId"
}
],
"kind": "Fragment",
@@ -116,9 +122,15 @@ return {
"alias": "risks",
"args": [
{
"kind": "Variable",
"name": "orderBy",
"variableName": "order"
"fields": [
{
"kind": "Variable",
"name": "snapshotId",
"variableName": "snapshotId"
}
],
"kind": "ObjectValue",
"name": "filter"
}
],
"concreteType": "RiskConnection",
@@ -143,6 +155,13 @@ return {
"plural": false,
"selections": [
(v1/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "snapshotId",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -280,6 +299,6 @@ return {
};
})();
(node as any).hash = "dc662098b9aceaa2400f4656ed1b2d01";
(node as any).hash = "95c68a022cbf075eede9b7417393a369";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<8ae6d82b30ec5657f8a55bd47fab4e7e>>
* @generated SignedSource<<af89b7b79cdb083497eabebd82b51991>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -12,6 +12,7 @@ import { ConcreteRequest } from 'relay-runtime';
import { FragmentRefs } from "relay-runtime";
export type RiskGraphListQuery$variables = {
organizationId: string;
snapshotId?: string | null | undefined;
};
export type RiskGraphListQuery$data = {
readonly organization: {
@@ -30,6 +31,11 @@ var v0 = [
"defaultValue": null,
"kind": "LocalArgument",
"name": "organizationId"
},
{
"defaultValue": null,
"kind": "LocalArgument",
"name": "snapshotId"
}
],
v1 = [
@@ -46,14 +52,26 @@ v2 = {
"name": "id",
"storageKey": null
},
v3 = {
v3 = [
{
"kind": "Variable",
"name": "snapshotId",
"variableName": "snapshotId"
}
],
v4 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "__typename",
"storageKey": null
},
v4 = [
v5 = [
{
"fields": (v3/*: any*/),
"kind": "ObjectValue",
"name": "filter"
},
{
"kind": "Literal",
"name": "first",
@@ -77,7 +95,7 @@ return {
"selections": [
(v2/*: any*/),
{
"args": null,
"args": (v3/*: any*/),
"kind": "FragmentSpread",
"name": "RiskGraphFragment"
}
@@ -102,14 +120,14 @@ return {
"name": "node",
"plural": false,
"selections": [
(v3/*: any*/),
(v4/*: any*/),
(v2/*: any*/),
{
"kind": "InlineFragment",
"selections": [
{
"alias": null,
"args": (v4/*: any*/),
"args": (v5/*: any*/),
"concreteType": "RiskConnection",
"kind": "LinkedField",
"name": "risks",
@@ -132,6 +150,13 @@ return {
"plural": false,
"selections": [
(v2/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "snapshotId",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -221,7 +246,7 @@ return {
],
"storageKey": null
},
(v3/*: any*/)
(v4/*: any*/)
],
"storageKey": null
},
@@ -275,13 +300,13 @@ return {
"storageKey": null
}
],
"storageKey": "risks(first:50)"
"storageKey": null
},
{
"alias": null,
"args": (v4/*: any*/),
"args": (v5/*: any*/),
"filters": [
"orderBy"
"filter"
],
"handle": "connection",
"key": "RisksListQuery_risks",
@@ -298,16 +323,16 @@ return {
]
},
"params": {
"cacheID": "36e237e142f201c74ebc23ff46d7345a",
"cacheID": "b2114c476ed7e095fc9d2317b6b1c554",
"id": null,
"metadata": {},
"name": "RiskGraphListQuery",
"operationKind": "query",
"text": "query RiskGraphListQuery(\n $organizationId: ID!\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ...RiskGraphFragment\n }\n}\n\nfragment RiskGraphFragment on Organization {\n risks(first: 50) {\n edges {\n node {\n id\n name\n category\n treatment\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n inherentRiskScore\n residualRiskScore\n ...useRiskFormFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\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 note\n owner {\n id\n }\n}\n"
"text": "query RiskGraphListQuery(\n $organizationId: ID!\n $snapshotId: ID\n) {\n organization: node(id: $organizationId) {\n __typename\n id\n ...RiskGraphFragment_3iomuz\n }\n}\n\nfragment RiskGraphFragment_3iomuz on Organization {\n risks(first: 50, filter: {snapshotId: $snapshotId}) {\n edges {\n node {\n id\n snapshotId\n name\n category\n treatment\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n inherentRiskScore\n residualRiskScore\n ...useRiskFormFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\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 note\n owner {\n id\n }\n}\n"
}
};
})();
(node as any).hash = "5d41ad11b598f63829f481ff0ae8aec7";
(node as any).hash = "a6e146d7d0f9d2713796935d0d615311";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<a4b7866dde478255ad0bb04a93ada596>>
* @generated SignedSource<<494ff8512e4a50c2bbc2cb3453dbab1c>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -23,6 +23,7 @@ export type RiskGraphNodeQuery$data = {
readonly documentsInfo?: {
readonly totalCount: number;
};
readonly id?: string;
readonly inherentRiskScore?: number;
readonly measuresInfo?: {
readonly totalCount: number;
@@ -34,6 +35,7 @@ export type RiskGraphNodeQuery$data = {
readonly id: string;
} | null | undefined;
readonly residualRiskScore?: number;
readonly snapshotId?: string | null | undefined;
readonly treatment?: RiskTreatment;
readonly " $fragmentSpreads": FragmentRefs<"RiskControlsTabFragment" | "RiskDocumentsTabFragment" | "RiskMeasuresTabFragment" | "RiskOverviewTabFragment" | "useRiskFormFragment">;
};
@@ -62,31 +64,38 @@ v2 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "name",
"name": "id",
"storageKey": null
},
v3 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "description",
"name": "snapshotId",
"storageKey": null
},
v4 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "treatment",
"name": "name",
"storageKey": null
},
v5 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"name": "description",
"storageKey": null
},
v6 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "treatment",
"storageKey": null
},
v7 = {
"alias": null,
"args": null,
"concreteType": "People",
@@ -94,7 +103,7 @@ v6 = {
"name": "owner",
"plural": false,
"selections": [
(v5/*: any*/),
(v2/*: any*/),
{
"alias": null,
"args": null,
@@ -105,35 +114,35 @@ v6 = {
],
"storageKey": null
},
v7 = {
v8 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "note",
"storageKey": null
},
v8 = {
v9 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "inherentRiskScore",
"storageKey": null
},
v9 = {
v10 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "residualRiskScore",
"storageKey": null
},
v10 = [
v11 = [
{
"kind": "Literal",
"name": "first",
"value": 0
}
],
v11 = [
v12 = [
{
"alias": null,
"args": null,
@@ -142,72 +151,72 @@ v11 = [
"storageKey": null
}
],
v12 = {
v13 = {
"alias": "measuresInfo",
"args": (v10/*: any*/),
"args": (v11/*: any*/),
"concreteType": "MeasureConnection",
"kind": "LinkedField",
"name": "measures",
"plural": false,
"selections": (v11/*: any*/),
"selections": (v12/*: any*/),
"storageKey": "measures(first:0)"
},
v13 = {
v14 = {
"alias": "documentsInfo",
"args": (v10/*: any*/),
"args": (v11/*: any*/),
"concreteType": "DocumentConnection",
"kind": "LinkedField",
"name": "documents",
"plural": false,
"selections": (v11/*: any*/),
"selections": (v12/*: any*/),
"storageKey": "documents(first:0)"
},
v14 = {
v15 = {
"alias": "controlsInfo",
"args": (v10/*: any*/),
"args": (v11/*: any*/),
"concreteType": "ControlConnection",
"kind": "LinkedField",
"name": "controls",
"plural": false,
"selections": (v11/*: any*/),
"selections": (v12/*: any*/),
"storageKey": "controls(first:0)"
},
v15 = {
v16 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "__typename",
"storageKey": null
},
v16 = [
v17 = [
{
"kind": "Literal",
"name": "first",
"value": 100
}
],
v17 = {
v18 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "cursor",
"storageKey": null
},
v18 = {
v19 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "endCursor",
"storageKey": null
},
v19 = {
v20 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "hasNextPage",
"storageKey": null
},
v20 = {
v21 = {
"alias": null,
"args": null,
"concreteType": "PageInfo",
@@ -215,12 +224,12 @@ v20 = {
"name": "pageInfo",
"plural": false,
"selections": [
(v18/*: any*/),
(v19/*: any*/)
(v19/*: any*/),
(v20/*: any*/)
],
"storageKey": null
},
v21 = {
v22 = {
"kind": "ClientExtension",
"selections": [
{
@@ -232,7 +241,7 @@ v21 = {
}
]
},
v22 = [
v23 = [
{
"kind": "Literal",
"name": "first",
@@ -260,13 +269,15 @@ return {
(v2/*: any*/),
(v3/*: any*/),
(v4/*: any*/),
(v5/*: any*/),
(v6/*: any*/),
(v7/*: any*/),
(v8/*: any*/),
(v9/*: any*/),
(v12/*: any*/),
(v10/*: any*/),
(v13/*: any*/),
(v14/*: any*/),
(v15/*: any*/),
{
"args": null,
"kind": "FragmentSpread",
@@ -317,21 +328,22 @@ return {
"name": "node",
"plural": false,
"selections": [
(v15/*: any*/),
(v5/*: any*/),
(v16/*: any*/),
(v2/*: any*/),
{
"kind": "InlineFragment",
"selections": [
(v2/*: any*/),
(v3/*: any*/),
(v4/*: any*/),
(v5/*: any*/),
(v6/*: any*/),
(v7/*: any*/),
(v8/*: any*/),
(v9/*: any*/),
(v12/*: any*/),
(v10/*: any*/),
(v13/*: any*/),
(v14/*: any*/),
(v15/*: any*/),
{
"alias": null,
"args": null,
@@ -369,7 +381,7 @@ return {
},
{
"alias": null,
"args": (v16/*: any*/),
"args": (v17/*: any*/),
"concreteType": "MeasureConnection",
"kind": "LinkedField",
"name": "measures",
@@ -391,8 +403,8 @@ return {
"name": "node",
"plural": false,
"selections": [
(v5/*: any*/),
(v2/*: any*/),
(v4/*: any*/),
{
"alias": null,
"args": null,
@@ -400,22 +412,22 @@ return {
"name": "state",
"storageKey": null
},
(v15/*: any*/)
(v16/*: any*/)
],
"storageKey": null
},
(v17/*: any*/)
(v18/*: any*/)
],
"storageKey": null
},
(v20/*: any*/),
(v21/*: any*/)
(v21/*: any*/),
(v22/*: any*/)
],
"storageKey": "measures(first:100)"
},
{
"alias": null,
"args": (v16/*: any*/),
"args": (v17/*: any*/),
"filters": null,
"handle": "connection",
"key": "Risk__measures",
@@ -424,7 +436,7 @@ return {
},
{
"alias": null,
"args": (v16/*: any*/),
"args": (v17/*: any*/),
"concreteType": "DocumentConnection",
"kind": "LinkedField",
"name": "documents",
@@ -446,7 +458,7 @@ return {
"name": "node",
"plural": false,
"selections": [
(v5/*: any*/),
(v2/*: any*/),
{
"alias": null,
"args": null,
@@ -498,7 +510,7 @@ return {
"name": "node",
"plural": false,
"selections": [
(v5/*: any*/),
(v2/*: any*/),
{
"alias": null,
"args": null,
@@ -515,22 +527,22 @@ return {
],
"storageKey": "versions(first:1)"
},
(v15/*: any*/)
(v16/*: any*/)
],
"storageKey": null
},
(v17/*: any*/)
(v18/*: any*/)
],
"storageKey": null
},
(v20/*: any*/),
(v21/*: any*/)
(v21/*: any*/),
(v22/*: any*/)
],
"storageKey": "documents(first:100)"
},
{
"alias": null,
"args": (v16/*: any*/),
"args": (v17/*: any*/),
"filters": null,
"handle": "connection",
"key": "Risk__documents",
@@ -539,7 +551,7 @@ return {
},
{
"alias": null,
"args": (v22/*: any*/),
"args": (v23/*: any*/),
"concreteType": "ControlConnection",
"kind": "LinkedField",
"name": "controls",
@@ -561,7 +573,7 @@ return {
"name": "node",
"plural": false,
"selections": [
(v5/*: any*/),
(v2/*: any*/),
{
"alias": null,
"args": null,
@@ -569,7 +581,7 @@ return {
"name": "sectionTitle",
"storageKey": null
},
(v2/*: any*/),
(v4/*: any*/),
{
"alias": null,
"args": null,
@@ -578,16 +590,16 @@ return {
"name": "framework",
"plural": false,
"selections": [
(v5/*: any*/),
(v2/*: any*/)
(v2/*: any*/),
(v4/*: any*/)
],
"storageKey": null
},
(v15/*: any*/)
(v16/*: any*/)
],
"storageKey": null
},
(v17/*: any*/)
(v18/*: any*/)
],
"storageKey": null
},
@@ -599,8 +611,8 @@ return {
"name": "pageInfo",
"plural": false,
"selections": [
(v18/*: any*/),
(v19/*: any*/),
(v20/*: any*/),
{
"alias": null,
"args": null,
@@ -623,7 +635,7 @@ return {
},
{
"alias": null,
"args": (v22/*: any*/),
"args": (v23/*: any*/),
"filters": [
"orderBy",
"filter"
@@ -643,16 +655,16 @@ return {
]
},
"params": {
"cacheID": "5cb3fdf2f48c4b0d2714a06ac2a8fc4d",
"cacheID": "03ef938803c52b572e23e691d50c4188",
"id": null,
"metadata": {},
"name": "RiskGraphNodeQuery",
"operationKind": "query",
"text": "query RiskGraphNodeQuery(\n $riskId: ID!\n) {\n node(id: $riskId) {\n __typename\n ... on Risk {\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 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 ...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 note\n owner {\n id\n }\n}\n"
}
};
})();
(node as any).hash = "a190e4ead5b381da07e69f00650d8372";
(node as any).hash = "43dcdf60f1d1b28414650fe5f9294faa";
export default node;

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<6369aba92b58ca2a67d57110a829bde4>>
* @generated SignedSource<<4a0922eabd4e20c574db91e75f45a562>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -23,6 +23,7 @@ export type RisksListQuery$variables = {
id: string;
last?: number | null | undefined;
order?: RiskOrder | null | undefined;
snapshotId?: string | null | undefined;
};
export type RisksListQuery$data = {
readonly node: {
@@ -65,52 +66,69 @@ v5 = {
"kind": "LocalArgument",
"name": "order"
},
v6 = [
v6 = {
"defaultValue": null,
"kind": "LocalArgument",
"name": "snapshotId"
},
v7 = [
{
"kind": "Variable",
"name": "id",
"variableName": "id"
}
],
v7 = {
v8 = {
"kind": "Variable",
"name": "after",
"variableName": "after"
},
v8 = {
v9 = {
"kind": "Variable",
"name": "before",
"variableName": "before"
},
v9 = {
v10 = {
"kind": "Variable",
"name": "first",
"variableName": "first"
},
v10 = {
v11 = {
"kind": "Variable",
"name": "last",
"variableName": "last"
},
v11 = {
v12 = {
"kind": "Variable",
"name": "snapshotId",
"variableName": "snapshotId"
},
v13 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "__typename",
"storageKey": null
},
v12 = {
v14 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "id",
"storageKey": null
},
v13 = [
(v7/*: any*/),
v15 = [
(v8/*: any*/),
(v9/*: any*/),
{
"fields": [
(v12/*: any*/)
],
"kind": "ObjectValue",
"name": "filter"
},
(v10/*: any*/),
(v11/*: any*/),
{
"kind": "Variable",
"name": "orderBy",
@@ -125,7 +143,8 @@ return {
(v2/*: any*/),
(v3/*: any*/),
(v4/*: any*/),
(v5/*: any*/)
(v5/*: any*/),
(v6/*: any*/)
],
"kind": "Fragment",
"metadata": null,
@@ -133,7 +152,7 @@ return {
"selections": [
{
"alias": null,
"args": (v6/*: any*/),
"args": (v7/*: any*/),
"concreteType": null,
"kind": "LinkedField",
"name": "node",
@@ -141,15 +160,16 @@ return {
"selections": [
{
"args": [
(v7/*: any*/),
(v8/*: any*/),
(v9/*: any*/),
(v10/*: any*/),
(v11/*: any*/),
{
"kind": "Variable",
"name": "order",
"variableName": "order"
}
},
(v12/*: any*/)
],
"kind": "FragmentSpread",
"name": "RiskGraphFragment"
@@ -169,6 +189,7 @@ return {
(v2/*: any*/),
(v4/*: any*/),
(v5/*: any*/),
(v6/*: any*/),
(v3/*: any*/)
],
"kind": "Operation",
@@ -176,20 +197,20 @@ return {
"selections": [
{
"alias": null,
"args": (v6/*: any*/),
"args": (v7/*: any*/),
"concreteType": null,
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v11/*: any*/),
(v12/*: any*/),
(v13/*: any*/),
(v14/*: any*/),
{
"kind": "InlineFragment",
"selections": [
{
"alias": null,
"args": (v13/*: any*/),
"args": (v15/*: any*/),
"concreteType": "RiskConnection",
"kind": "LinkedField",
"name": "risks",
@@ -211,7 +232,14 @@ return {
"name": "node",
"plural": false,
"selections": [
(v12/*: any*/),
(v14/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "snapshotId",
"storageKey": null
},
{
"alias": null,
"args": null,
@@ -297,11 +325,11 @@ return {
"name": "owner",
"plural": false,
"selections": [
(v12/*: any*/)
(v14/*: any*/)
],
"storageKey": null
},
(v11/*: any*/)
(v13/*: any*/)
],
"storageKey": null
},
@@ -359,9 +387,9 @@ return {
},
{
"alias": null,
"args": (v13/*: any*/),
"args": (v15/*: any*/),
"filters": [
"orderBy"
"filter"
],
"handle": "connection",
"key": "RisksListQuery_risks",
@@ -378,16 +406,16 @@ return {
]
},
"params": {
"cacheID": "ca8ad189a3d134eecaaf9adfe090277e",
"cacheID": "161eb78d1d5100120c68db5d8106aa7e",
"id": null,
"metadata": {},
"name": "RisksListQuery",
"operationKind": "query",
"text": "query RisksListQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 50\n $last: Int = null\n $order: RiskOrder = null\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...RiskGraphFragment_16fISc\n id\n }\n}\n\nfragment RiskGraphFragment_16fISc on Organization {\n risks(first: $first, after: $after, last: $last, before: $before, orderBy: $order) {\n edges {\n node {\n id\n name\n category\n treatment\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n inherentRiskScore\n residualRiskScore\n ...useRiskFormFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\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 note\n owner {\n id\n }\n}\n"
"text": "query RisksListQuery(\n $after: CursorKey = null\n $before: CursorKey = null\n $first: Int = 50\n $last: Int = null\n $order: RiskOrder = null\n $snapshotId: ID = null\n $id: ID!\n) {\n node(id: $id) {\n __typename\n ...RiskGraphFragment_25MC8O\n id\n }\n}\n\nfragment RiskGraphFragment_25MC8O on Organization {\n risks(first: $first, after: $after, last: $last, before: $before, orderBy: $order, filter: {snapshotId: $snapshotId}) {\n edges {\n node {\n id\n snapshotId\n name\n category\n treatment\n inherentLikelihood\n inherentImpact\n residualLikelihood\n residualImpact\n inherentRiskScore\n residualRiskScore\n ...useRiskFormFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n id\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 note\n owner {\n id\n }\n}\n"
}
};
})();
(node as any).hash = "dc662098b9aceaa2400f4656ed1b2d01";
(node as any).hash = "95c68a022cbf075eede9b7417393a369";
export default node;