Skip to content

Commit 9bad941

Browse files
committed
fixup: protocol configs comments
1 parent 70286df commit 9bad941

File tree

3 files changed

+23
-25
lines changed

3 files changed

+23
-25
lines changed

crates/sui-indexer-alt-e2e-tests/tests/graphql/epochs/protocol_configs.move

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@
77

88
//# run-graphql
99
{ # Protocol Configs that don't exist (because they haven't been used in the
10-
# chain being indexed)
11-
protocolConfigs(version: 69) { protocolVersion }
12-
protocolConfigs(version: 71) { protocolVersion }
10+
# chain being indexed) -- their config lists will be empty.
11+
before: protocolConfigs(version: 69) {
12+
protocolVersion
13+
configs { key value }
14+
}
15+
16+
after: protocolConfigs(version: 71) {
17+
protocolVersion
18+
configs { key value }
19+
}
1320
}
1421

1522
//# run-graphql

crates/sui-indexer-alt-e2e-tests/tests/graphql/epochs/protocol_configs.snap

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,22 @@ task 1, line 6:
1010
//# create-checkpoint
1111
Checkpoint created: 1
1212

13-
task 2, lines 8-13:
13+
task 2, lines 8-20:
1414
//# run-graphql
1515
Response: {
16-
"data": null,
17-
"errors": [
18-
{
19-
"message": "Fields \"version\" conflict because they have differing arguments. Use different aliases on the fields to fetch both if this was intentional.",
20-
"locations": [
21-
{
22-
"line": 3,
23-
"column": 3
24-
},
25-
{
26-
"line": 4,
27-
"column": 3
28-
}
29-
],
30-
"extensions": {
31-
"code": "GRAPHQL_VALIDATION_FAILED"
32-
}
16+
"data": {
17+
"before": {
18+
"protocolVersion": 69,
19+
"configs": []
20+
},
21+
"after": {
22+
"protocolVersion": 71,
23+
"configs": []
3324
}
34-
]
25+
}
3526
}
3627

37-
task 3, lines 15-21:
28+
task 3, lines 22-28:
3829
//# run-graphql
3930
Response: {
4031
"data": {
@@ -51,7 +42,7 @@ Response: {
5142
}
5243
}
5344

54-
task 4, lines 23-33:
45+
task 4, lines 30-40:
5546
//# run-graphql
5647
Response: {
5748
"data": {

crates/sui-indexer-alt-graphql/src/api/types/protocol_configs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ impl FlagContent {
148148
let configs: Vec<StoredFeatureFlag> = conn
149149
.results(p::kv_feature_flags.filter(p::protocol_version.eq(protocol_version as i64)))
150150
.await
151-
.context("Fail to fetch protocol configs")?;
151+
.context("Fail to fetch feature flags")?;
152152

153153
Ok(Self(
154154
configs

0 commit comments

Comments
 (0)