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:
@ -2,11 +2,15 @@ import { Injectable } from '@nestjs/common';
|
||||
import { OnEvent } from '@nestjs/event-emitter';
|
||||
|
||||
import { AnalyticsService } from 'src/engine/core-modules/analytics/analytics.service';
|
||||
import { EnvironmentService } from 'src/engine/integrations/environment/environment.service';
|
||||
import { ObjectRecordCreateEvent } from 'src/engine/integrations/event-emitter/types/object-record-create.event';
|
||||
|
||||
@Injectable()
|
||||
export class TelemetryListener {
|
||||
constructor(private readonly analyticsService: AnalyticsService) {}
|
||||
constructor(
|
||||
private readonly analyticsService: AnalyticsService,
|
||||
private readonly environmentService: EnvironmentService,
|
||||
) {}
|
||||
|
||||
@OnEvent('*.created')
|
||||
async handleAllCreate(payload: ObjectRecordCreateEvent<any>) {
|
||||
@ -21,7 +25,7 @@ export class TelemetryListener {
|
||||
payload.workspaceId,
|
||||
'', // voluntarely not retrieving this
|
||||
'', // to avoid slowing down
|
||||
'',
|
||||
this.environmentService.get('SERVER_URL'),
|
||||
);
|
||||
}
|
||||
|
||||
@ -38,7 +42,7 @@ export class TelemetryListener {
|
||||
payload.workspaceId,
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
this.environmentService.get('SERVER_URL'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user