Skip to content

Commit a3543af

Browse files
committed
feat: expose view rules
1 parent dc3adab commit a3543af

File tree

2 files changed

+187
-0
lines changed

2 files changed

+187
-0
lines changed

src/main/kotlin/spp/protocol/service/LiveViewService.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ interface LiveViewService {
5858
}
5959
}
6060

61+
fun getRules(): Future<List<ViewRule>>
62+
fun getRule(ruleName: String): Future<ViewRule?>
6163
fun saveRule(rule: ViewRule): Future<ViewRule>
6264
fun deleteRule(ruleName: String): Future<ViewRule?>
6365

src/main/resources/graphql/schema.json

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5555,6 +5555,57 @@
55555555
"isDeprecated": false,
55565556
"deprecationReason": null
55575557
},
5558+
{
5559+
"name": "getRules",
5560+
"description": null,
5561+
"args": [],
5562+
"type": {
5563+
"kind": "NON_NULL",
5564+
"name": null,
5565+
"ofType": {
5566+
"kind": "LIST",
5567+
"name": null,
5568+
"ofType": {
5569+
"kind": "NON_NULL",
5570+
"name": null,
5571+
"ofType": {
5572+
"kind": "OBJECT",
5573+
"name": "ViewRule",
5574+
"ofType": null
5575+
}
5576+
}
5577+
}
5578+
},
5579+
"isDeprecated": false,
5580+
"deprecationReason": null
5581+
},
5582+
{
5583+
"name": "getRule",
5584+
"description": null,
5585+
"args": [
5586+
{
5587+
"name": "ruleName",
5588+
"description": null,
5589+
"type": {
5590+
"kind": "NON_NULL",
5591+
"name": null,
5592+
"ofType": {
5593+
"kind": "SCALAR",
5594+
"name": "String",
5595+
"ofType": null
5596+
}
5597+
},
5598+
"defaultValue": null
5599+
}
5600+
],
5601+
"type": {
5602+
"kind": "OBJECT",
5603+
"name": "ViewRule",
5604+
"ofType": null
5605+
},
5606+
"isDeprecated": false,
5607+
"deprecationReason": null
5608+
},
55585609
{
55595610
"name": "getLiveViews",
55605611
"description": null,
@@ -6112,6 +6163,49 @@
61126163
],
61136164
"possibleTypes": null
61146165
},
6166+
{
6167+
"kind": "OBJECT",
6168+
"name": "RulePartition",
6169+
"description": null,
6170+
"fields": [
6171+
{
6172+
"name": "find",
6173+
"description": null,
6174+
"args": [],
6175+
"type": {
6176+
"kind": "NON_NULL",
6177+
"name": null,
6178+
"ofType": {
6179+
"kind": "SCALAR",
6180+
"name": "String",
6181+
"ofType": null
6182+
}
6183+
},
6184+
"isDeprecated": false,
6185+
"deprecationReason": null
6186+
},
6187+
{
6188+
"name": "replace",
6189+
"description": null,
6190+
"args": [],
6191+
"type": {
6192+
"kind": "NON_NULL",
6193+
"name": null,
6194+
"ofType": {
6195+
"kind": "SCALAR",
6196+
"name": "String",
6197+
"ofType": null
6198+
}
6199+
},
6200+
"isDeprecated": false,
6201+
"deprecationReason": null
6202+
}
6203+
],
6204+
"inputFields": null,
6205+
"interfaces": [],
6206+
"enumValues": null,
6207+
"possibleTypes": null
6208+
},
61156209
{
61166210
"kind": "OBJECT",
61176211
"name": "SelectedRecord",
@@ -7341,6 +7435,97 @@
73417435
"enumValues": null,
73427436
"possibleTypes": null
73437437
},
7438+
{
7439+
"kind": "OBJECT",
7440+
"name": "ViewRule",
7441+
"description": null,
7442+
"fields": [
7443+
{
7444+
"name": "name",
7445+
"description": null,
7446+
"args": [],
7447+
"type": {
7448+
"kind": "NON_NULL",
7449+
"name": null,
7450+
"ofType": {
7451+
"kind": "SCALAR",
7452+
"name": "String",
7453+
"ofType": null
7454+
}
7455+
},
7456+
"isDeprecated": false,
7457+
"deprecationReason": null
7458+
},
7459+
{
7460+
"name": "exp",
7461+
"description": null,
7462+
"args": [],
7463+
"type": {
7464+
"kind": "NON_NULL",
7465+
"name": null,
7466+
"ofType": {
7467+
"kind": "SCALAR",
7468+
"name": "String",
7469+
"ofType": null
7470+
}
7471+
},
7472+
"isDeprecated": false,
7473+
"deprecationReason": null
7474+
},
7475+
{
7476+
"name": "partitions",
7477+
"description": null,
7478+
"args": [],
7479+
"type": {
7480+
"kind": "NON_NULL",
7481+
"name": null,
7482+
"ofType": {
7483+
"kind": "LIST",
7484+
"name": null,
7485+
"ofType": {
7486+
"kind": "NON_NULL",
7487+
"name": null,
7488+
"ofType": {
7489+
"kind": "OBJECT",
7490+
"name": "RulePartition",
7491+
"ofType": null
7492+
}
7493+
}
7494+
}
7495+
},
7496+
"isDeprecated": false,
7497+
"deprecationReason": null
7498+
},
7499+
{
7500+
"name": "meterIds",
7501+
"description": null,
7502+
"args": [],
7503+
"type": {
7504+
"kind": "NON_NULL",
7505+
"name": null,
7506+
"ofType": {
7507+
"kind": "LIST",
7508+
"name": null,
7509+
"ofType": {
7510+
"kind": "NON_NULL",
7511+
"name": null,
7512+
"ofType": {
7513+
"kind": "SCALAR",
7514+
"name": "String",
7515+
"ofType": null
7516+
}
7517+
}
7518+
}
7519+
},
7520+
"isDeprecated": false,
7521+
"deprecationReason": null
7522+
}
7523+
],
7524+
"inputFields": null,
7525+
"interfaces": [],
7526+
"enumValues": null,
7527+
"possibleTypes": null
7528+
},
73447529
{
73457530
"kind": "OBJECT",
73467531
"name": "__Directive",

0 commit comments

Comments
 (0)