mirror of
https://github.com/unraid/api.git
synced 2026-01-01 06:01:18 -06:00
feat: docker and info resolver issues (#1423)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - The system info query now returns only the `id` field, with other details loaded separately. - **Chores** - Internal service dependencies were updated for improved maintainability. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import { Module } from '@nestjs/common';
|
import { Module } from '@nestjs/common';
|
||||||
|
|
||||||
import { DockerEventService } from '@app/unraid-api/graph/resolvers/docker/docker-event.service.js';
|
|
||||||
import { DockerMutationsResolver } from '@app/unraid-api/graph/resolvers/docker/docker.mutations.resolver.js';
|
import { DockerMutationsResolver } from '@app/unraid-api/graph/resolvers/docker/docker.mutations.resolver.js';
|
||||||
import { DockerResolver } from '@app/unraid-api/graph/resolvers/docker/docker.resolver.js';
|
import { DockerResolver } from '@app/unraid-api/graph/resolvers/docker/docker.resolver.js';
|
||||||
import { DockerService } from '@app/unraid-api/graph/resolvers/docker/docker.service.js';
|
import { DockerService } from '@app/unraid-api/graph/resolvers/docker/docker.service.js';
|
||||||
@@ -9,12 +8,12 @@ import { DockerService } from '@app/unraid-api/graph/resolvers/docker/docker.ser
|
|||||||
providers: [
|
providers: [
|
||||||
// Services
|
// Services
|
||||||
DockerService,
|
DockerService,
|
||||||
DockerEventService,
|
// DockerEventService,
|
||||||
|
|
||||||
// Resolvers
|
// Resolvers
|
||||||
DockerResolver,
|
DockerResolver,
|
||||||
DockerMutationsResolver,
|
DockerMutationsResolver,
|
||||||
],
|
],
|
||||||
exports: [DockerService, DockerEventService],
|
exports: [DockerService],
|
||||||
})
|
})
|
||||||
export class DockerModule {}
|
export class DockerModule {}
|
||||||
|
|||||||
@@ -40,20 +40,9 @@ export class InfoResolver {
|
|||||||
resource: Resource.INFO,
|
resource: Resource.INFO,
|
||||||
possession: AuthPossession.ANY,
|
possession: AuthPossession.ANY,
|
||||||
})
|
})
|
||||||
public async info(): Promise<Info> {
|
public async info(): Promise<Partial<Info>> {
|
||||||
return {
|
return {
|
||||||
id: 'info',
|
id: 'info',
|
||||||
time: new Date(),
|
|
||||||
apps: await this.apps(),
|
|
||||||
baseboard: await this.baseboard(),
|
|
||||||
cpu: await this.cpu(),
|
|
||||||
devices: await this.devices(),
|
|
||||||
display: await this.display(),
|
|
||||||
machineId: await this.machineId(),
|
|
||||||
memory: await this.memory(),
|
|
||||||
os: await this.os(),
|
|
||||||
system: await this.system(),
|
|
||||||
versions: await this.versions(),
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user