From bc52e96b1c8188ecd939216c0cf4baa17f6670dd Mon Sep 17 00:00:00 2001 From: Martin Sottnik Date: Wed, 26 Jul 2023 13:24:30 +0200 Subject: [PATCH] task definitions createdAt, updatedAt fix --- src/schema/api.graphql | 4 ++-- src/schema/nexus-typegen.ts | 8 ++++---- src/schema/task-definitons.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/schema/api.graphql b/src/schema/api.graphql index 04c03408..b094c4af 100644 --- a/src/schema/api.graphql +++ b/src/schema/api.graphql @@ -1076,7 +1076,7 @@ type Tag { type TaskDefinition implements Node { concurrentExecLimit: Int - createTime: String + createdAt: String createdBy: String description: String id: ID! @@ -1094,7 +1094,7 @@ type TaskDefinition implements Node { retryLogic: RetryLogic timeoutPolicy: TaskTimeoutPolicy timeoutSeconds: Int! - updateTime: String + updatedAt: String updatedBy: String } diff --git a/src/schema/nexus-typegen.ts b/src/schema/nexus-typegen.ts index 57c0758f..a8c63950 100644 --- a/src/schema/nexus-typegen.ts +++ b/src/schema/nexus-typegen.ts @@ -1630,7 +1630,7 @@ export interface NexusGenFieldTypes { TaskDefinition: { // field return type concurrentExecLimit: number | null; // Int - createTime: string | null; // String + createdAt: string | null; // String createdBy: string | null; // String description: string | null; // String id: string; // ID! @@ -1648,7 +1648,7 @@ export interface NexusGenFieldTypes { retryLogic: NexusGenEnums['RetryLogic'] | null; // RetryLogic timeoutPolicy: NexusGenEnums['TaskTimeoutPolicy'] | null; // TaskTimeoutPolicy timeoutSeconds: number; // Int! - updateTime: string | null; // String + updatedAt: string | null; // String updatedBy: string | null; // String }; TaskDefinitionConnection: { @@ -2395,7 +2395,7 @@ export interface NexusGenFieldTypeNames { TaskDefinition: { // field return type name concurrentExecLimit: 'Int'; - createTime: 'String'; + createdAt: 'String'; createdBy: 'String'; description: 'String'; id: 'ID'; @@ -2413,7 +2413,7 @@ export interface NexusGenFieldTypeNames { retryLogic: 'RetryLogic'; timeoutPolicy: 'TaskTimeoutPolicy'; timeoutSeconds: 'Int'; - updateTime: 'String'; + updatedAt: 'String'; updatedBy: 'String'; }; TaskDefinitionConnection: { diff --git a/src/schema/task-definitons.ts b/src/schema/task-definitons.ts index 57f6be06..c0fb7bf6 100644 --- a/src/schema/task-definitons.ts +++ b/src/schema/task-definitons.ts @@ -36,11 +36,11 @@ export const TaskDefinition = objectType({ }); t.nonNull.string('name'); t.nonNull.int('timeoutSeconds'); - t.string('createTime', { + t.string('createdAt', { resolve: (taskDefinition) => taskDefinition.createTime ? new Date(taskDefinition.createTime).toISOString() : new Date().toISOString(), }); - t.string('updateTime', { + t.string('updatedAt', { resolve: (taskDefinition) => taskDefinition.updateTime ? new Date(taskDefinition.updateTime).toISOString() : new Date().toISOString(), });