aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-11-05 09:09:39 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-11-05 10:29:47 +0200
commit3eb521db2d615c8513caad9e29cfa1197ece7b7a (patch)
tree82aa97ee0f5c0c4a5a3e275393b4c101ab886467
parent92243843ceb11880275da7a59f79fdee728bdc3c (diff)
GraphQL: rename `id` to `node_id` in responses
-rw-r--r--mod/mod-ci-github-gq.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/mod/mod-ci-github-gq.cxx b/mod/mod-ci-github-gq.cxx
index 1909e1f..0868987 100644
--- a/mod/mod-ci-github-gq.cxx
+++ b/mod/mod-ci-github-gq.cxx
@@ -168,14 +168,14 @@ namespace brep
// {
// "cr0": {
// "checkRun": {
- // "id": "CR_kwDOLc8CoM8AAAAFQ5GqPg",
+ // "node_id": "CR_kwDOLc8CoM8AAAAFQ5GqPg",
// "name": "libb2/0.98.1+2/x86_64-linux-gnu/linux_debian_12-gcc_13.1-O3/default/dev/0.17.0-a.1",
// "status": "QUEUED"
// }
// },
// "cr1": {
// "checkRun": {
- // "id": "CR_kwDOLc8CoM8AAAAFQ5GqhQ",
+ // "node_id": "CR_kwDOLc8CoM8AAAAFQ5GqhQ",
// "name": "libb2/0.98.1+2/x86_64-linux-gnu/linux_debian_12-gcc_13.1/default/dev/0.17.0-a.1",
// "status": "QUEUED"
// }
@@ -399,11 +399,13 @@ namespace brep
<< " }";
}
os << "})" << '\n'
- // Specify the selection set (fields to be returned).
+ // Specify the selection set (fields to be returned). Note that we
+ // rename `id` to `node_id` (using a field alias) for consistency with
+ // webhook events and REST API responses.
//
<< "{" << '\n'
<< " checkRun {" << '\n'
- << " id" << '\n'
+ << " node_id: id" << '\n'
<< " name" << '\n'
<< " status" << '\n'
<< " }" << '\n'
@@ -460,11 +462,13 @@ namespace brep
<< " }";
}
os << "})" << '\n'
- // Specify the selection set (fields to be returned).
+ // Specify the selection set (fields to be returned). Note that we
+ // rename `id` to `node_id` (using a field alias) for consistency with
+ // webhook events and REST API responses.
//
<< "{" << '\n'
<< " checkRun {" << '\n'
- << " id" << '\n'
+ << " node_id: id" << '\n'
<< " name" << '\n'
<< " status" << '\n'
<< " }" << '\n'