Skip to content

Commit 1f6708f

Browse files
Merge upstream develop
2 parents 485e523 + b1ee25f commit 1f6708f

4 files changed

Lines changed: 44 additions & 7 deletions

File tree

.gitlab/ci/deploy_app.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@
1818
entrypoint: ['']
1919
script:
2020
- crane auth login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
21-
- crane tag $CI_REGISTRY_IMAGE/app:$CI_COMMIT_SHA $ENVIRONMENT
21+
- crane tag $CI_REGISTRY_IMAGE/app:$CI_COMMIT_SHA $CI_ENVIRONMENT_NAME
2222
needs:
2323
- job: app-web-image
2424
artifacts: false
2525

2626
app-deploy-image-staging:
2727
extends: .app-deploy-image
28-
variables:
29-
ENVIRONMENT: staging
28+
environment:
29+
name: staging
3030

3131
app-deploy-image-production:
3232
extends: .app-deploy-image
3333
when: manual
34-
variables:
35-
ENVIRONMENT: production
34+
environment:
35+
name: production
3636

3737
###############################
3838
# Rolling restart on Manifest #

apps/polycentric/src/common/query/hooks/useQuery.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export const useQueryStore = create<QueryStoreState>((set, get) => {
6969
status: QueryStatus.Loading,
7070
error: null,
7171
});
72+
7273
// Request from rs-core
7374
const observable = args.client.core.fetchQuery(
7475
args.queryKey,
@@ -81,7 +82,10 @@ export const useQueryStore = create<QueryStoreState>((set, get) => {
8182
updateQueryRef(key, { data: result.data, status: result.status });
8283
},
8384
error(message) {
84-
updateQueryRef(key, { error: message, status: QueryStatus.Error });
85+
console.warn(`useQuery[${key}] error: ${message}`);
86+
if (get().queries.get(key)?.status === QueryStatus.Error) {
87+
updateQueryRef(key, { error: message });
88+
}
8589
},
8690
complete() {
8791
// Terminal status already arrived via the final `next`.

protos/polycentric/v2/common.proto

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
syntax = "proto3";
2+
package polycentric.v2;
3+
4+
message PageInfo {
5+
string end_cursor = 1;
6+
bool has_next_page = 2;
7+
bool has_previous_page = 3;
8+
string start_cursor = 4;
9+
}

protos/polycentric/v2/notifications.proto

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,32 @@
11
syntax = "proto3";
22
package polycentric.v2;
33

4+
import "polycentric/v2/common.proto";
5+
import "polycentric/v2/events.proto";
46
import "polycentric/v2/server.proto";
57

8+
message Notification {
9+
// Event that triggered the notification
10+
EventBundle trigger_event = 1;
11+
// Event that the notification is in relation to
12+
EventBundle subject_event = 2;
13+
}
14+
15+
message GetNotificationsRequest {
16+
string identity = 1;
17+
// Return the 1 X number of notifications
18+
optional uint32 first = 2;
19+
// Return notifications after a cursor
20+
optional string after = 3;
21+
}
22+
23+
message GetNotificationsResponse {
24+
repeated Notification notification = 1;
25+
// Events that help the client resolve with fewer network calls
26+
repeated EventHint event_hints = 2;
27+
PageInfo page_info = 3;
28+
}
29+
630
message RegisterPushNotificationRequest {
731
string service = 1;
832
string token = 2;
@@ -26,4 +50,4 @@ service NotificationService {
2650

2751
// This endpoint expects a signed UnregisterPushNotificationRequest message
2852
rpc UnregisterPushNotifications(SignedMessage) returns (UnregisterPushNotificationResponse);
29-
}
53+
}

0 commit comments

Comments
 (0)