Refacto rest api, fix graphl playground, improve analytics (#5844)

- Improve the rest api by introducing startingAfter/endingBefore (we
previously had lastCursor), and moving pageInfo/totalCount outside of
the data object.
- Fix broken GraphQL playground on website
- Improve analytics by sending server url
This commit is contained in:
Félix Malfait
2024-06-12 21:54:33 +02:00
committed by GitHub
parent 04edf2bf7b
commit 374237a988
22 changed files with 277 additions and 131 deletions

View File

@ -1,6 +1,7 @@
import { Injectable } from '@nestjs/common';
import { AnalyticsService } from 'src/engine/core-modules/analytics/analytics.service';
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
type MessagingTelemetryTrackInput = {
eventName: string;
@ -13,7 +14,10 @@ type MessagingTelemetryTrackInput = {
@Injectable()
export class MessagingTelemetryService {
constructor(private readonly analyticsService: AnalyticsService) {}
constructor(
private readonly analyticsService: AnalyticsService,
private readonly environmentService: EnvironmentService,
) {}
public async track({
eventName,
@ -39,7 +43,7 @@ export class MessagingTelemetryService {
workspaceId,
'', // voluntarely not retrieving this
'', // to avoid slowing down
'',
this.environmentService.get('SERVER_URL'),
);
}
}