Refacto environment service (#4473)

* Refacto environment service

* Remove environment variable type
This commit is contained in:
Félix Malfait
2024-03-14 11:51:19 +01:00
committed by GitHub
parent 3caf860848
commit fd06d52a13
42 changed files with 320 additions and 480 deletions

View File

@ -46,11 +46,11 @@ export class GraphQLConfigService
) {}
createGqlOptions(): YogaDriverConfig {
const isDebugMode = this.environmentService.isDebugMode();
const isDebugMode = this.environmentService.get('DEBUG_MODE');
const plugins = [
useThrottler({
ttl: this.environmentService.getApiRateLimitingTtl(),
limit: this.environmentService.getApiRateLimitingLimit(),
ttl: this.environmentService.get('API_RATE_LIMITING_TTL'),
limit: this.environmentService.get('API_RATE_LIMITING_LIMIT'),
identifyFn: (context) => {
return context.user?.id ?? context.req.ip ?? 'anonymous';
},