From 940280028db1b28a4b5b2db712f62af2c851c8bf Mon Sep 17 00:00:00 2001 From: Peto Date: Wed, 10 Jul 2024 11:57:01 +0200 Subject: [PATCH] adjusted ordering of devices --- src/helpers/device-helpers.ts | 2 +- src/schema/api.graphql | 3 +-- src/schema/device.ts | 2 +- src/schema/nexus-typegen.ts | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/helpers/device-helpers.ts b/src/helpers/device-helpers.ts index ffd604cd..61932bf6 100644 --- a/src/helpers/device-helpers.ts +++ b/src/helpers/device-helpers.ts @@ -13,7 +13,7 @@ type FilterQuery = { }; type DeviceOrderingInput = { - sortKey: 'name' | 'createdAt' | 'serviceState'; + sortKey: 'name' | 'discoveredAt'; direction: 'ASC' | 'DESC'; }; diff --git a/src/schema/api.graphql b/src/schema/api.graphql index c07fc17c..7bf561c4 100644 --- a/src/schema/api.graphql +++ b/src/schema/api.graphql @@ -654,9 +654,8 @@ type Snapshot { } enum SortDeviceBy { - createdAt + discoveredAt name - serviceState } enum SortDirection { diff --git a/src/schema/device.ts b/src/schema/device.ts index 7d53829e..d4c5b654 100644 --- a/src/schema/device.ts +++ b/src/schema/device.ts @@ -201,7 +201,7 @@ export const FilterDevicesInput = inputObjectType({ }); export const SortDeviceBy = enumType({ name: 'SortDeviceBy', - members: ['name', 'createdAt', 'serviceState'], + members: ['name', 'discoveredAt'], }); export const DeviceOrderByInput = inputObjectType({ name: 'DeviceOrderByInput', diff --git a/src/schema/nexus-typegen.ts b/src/schema/nexus-typegen.ts index 70aabb50..1e77e02c 100644 --- a/src/schema/nexus-typegen.ts +++ b/src/schema/nexus-typegen.ts @@ -190,7 +190,7 @@ export interface NexusGenEnums { DeviceSize: 'LARGE' | 'MEDIUM' | 'SMALL'; DeviceSource: 'DISCOVERED' | 'IMPORTED' | 'MANUAL'; GraphEdgeStatus: 'ok' | 'unknown'; - SortDeviceBy: 'createdAt' | 'name' | 'serviceState'; + SortDeviceBy: 'discoveredAt' | 'name'; SortDirection: 'ASC' | 'DESC'; SortStreamBy: 'createdAt' | 'streamName'; TopologyLayer: 'EthTopology' | 'PhysicalTopology' | 'PtpTopology';