Add controls snapshots

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-08-27 09:39:28 +02:00
parent 37fe6f4b00
commit 05b9672a03
27 changed files with 3679 additions and 68 deletions

View File

@@ -130,6 +130,16 @@ export const frameworkControlNodeQuery = graphql`
}
}
}
snapshots(first: 100)
@connection(key: "FrameworkGraphControl_snapshots") {
__id
edges {
node {
id
...LinkedSnapshotsCardFragment
}
}
}
}
}
}

View File

@@ -1,5 +1,5 @@
/**
* @generated SignedSource<<dec38386ca0015f6c77121c2740fa406>>
* @generated SignedSource<<0e6281a892cbd711d75d22153d4710ea>>
* @lightSyntaxTransform
* @nogrep
*/
@@ -48,6 +48,15 @@ export type FrameworkGraphControlNodeQuery$data = {
};
readonly name?: string;
readonly sectionTitle?: string;
readonly snapshots?: {
readonly __id: string;
readonly edges: ReadonlyArray<{
readonly node: {
readonly id: string;
readonly " $fragmentSpreads": FragmentRefs<"LinkedSnapshotsCardFragment">;
};
}>;
};
readonly status?: ControlStatus;
readonly " $fragmentSpreads": FragmentRefs<"FrameworkControlDialogFragment">;
};
@@ -343,6 +352,49 @@ return {
(v11/*: any*/)
],
"storageKey": null
},
{
"alias": "snapshots",
"args": null,
"concreteType": "SnapshotConnection",
"kind": "LinkedField",
"name": "__FrameworkGraphControl_snapshots_connection",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "SnapshotEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "Snapshot",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v2/*: any*/),
{
"args": null,
"kind": "FragmentSpread",
"name": "LinkedSnapshotsCardFragment"
},
(v8/*: any*/)
],
"storageKey": null
},
(v9/*: any*/)
],
"storageKey": null
},
(v10/*: any*/),
(v11/*: any*/)
],
"storageKey": null
}
],
"type": "Control",
@@ -607,6 +659,63 @@ return {
"key": "FrameworkGraphControl_audits",
"kind": "LinkedHandle",
"name": "audits"
},
{
"alias": null,
"args": (v12/*: any*/),
"concreteType": "SnapshotConnection",
"kind": "LinkedField",
"name": "snapshots",
"plural": false,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "SnapshotEdge",
"kind": "LinkedField",
"name": "edges",
"plural": true,
"selections": [
{
"alias": null,
"args": null,
"concreteType": "Snapshot",
"kind": "LinkedField",
"name": "node",
"plural": false,
"selections": [
(v2/*: any*/),
(v3/*: any*/),
(v5/*: any*/),
{
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "type",
"storageKey": null
},
(v14/*: any*/),
(v8/*: any*/)
],
"storageKey": null
},
(v9/*: any*/)
],
"storageKey": null
},
(v10/*: any*/),
(v11/*: any*/)
],
"storageKey": "snapshots(first:100)"
},
{
"alias": null,
"args": (v12/*: any*/),
"filters": null,
"handle": "connection",
"key": "FrameworkGraphControl_snapshots",
"kind": "LinkedHandle",
"name": "snapshots"
}
],
"type": "Control",
@@ -618,7 +727,7 @@ return {
]
},
"params": {
"cacheID": "20a0b80a6b0d796951c7f8c6eca41d3c",
"cacheID": "2ce9eb2cbe052019e86b2d0baecfb6f0",
"id": null,
"metadata": {
"connection": [
@@ -648,16 +757,25 @@ return {
"node",
"audits"
]
},
{
"count": null,
"cursor": null,
"direction": "forward",
"path": [
"node",
"snapshots"
]
}
]
},
"name": "FrameworkGraphControlNodeQuery",
"operationKind": "query",
"text": "query FrameworkGraphControlNodeQuery(\n $controlId: ID!\n) {\n node(id: $controlId) {\n __typename\n ... on Control {\n id\n name\n sectionTitle\n description\n status\n exclusionJustification\n ...FrameworkControlDialogFragment\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 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 audits(first: 100) {\n edges {\n node {\n id\n ...LinkedAuditsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n id\n }\n}\n\nfragment FrameworkControlDialogFragment on Control {\n id\n name\n description\n sectionTitle\n status\n exclusionJustification\n}\n\nfragment LinkedAuditsCardFragment on Audit {\n id\n name\n createdAt\n state\n validFrom\n validUntil\n framework {\n id\n name\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"
"text": "query FrameworkGraphControlNodeQuery(\n $controlId: ID!\n) {\n node(id: $controlId) {\n __typename\n ... on Control {\n id\n name\n sectionTitle\n description\n status\n exclusionJustification\n ...FrameworkControlDialogFragment\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 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 audits(first: 100) {\n edges {\n node {\n id\n ...LinkedAuditsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n snapshots(first: 100) {\n edges {\n node {\n id\n ...LinkedSnapshotsCardFragment\n __typename\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n id\n }\n}\n\nfragment FrameworkControlDialogFragment on Control {\n id\n name\n description\n sectionTitle\n status\n exclusionJustification\n}\n\nfragment LinkedAuditsCardFragment on Audit {\n id\n name\n createdAt\n state\n validFrom\n validUntil\n framework {\n id\n name\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 LinkedSnapshotsCardFragment on Snapshot {\n id\n name\n description\n type\n createdAt\n}\n"
}
};
})();
(node as any).hash = "ac5240126dfbf4882ba2b111e865045d";
(node as any).hash = "afc4bbbce8d8b3cd57ac2bf77db58e55";
export default node;