diff --git a/src/schema/api.graphql b/src/schema/api.graphql index b9b5b0f8..7d6f08ef 100644 --- a/src/schema/api.graphql +++ b/src/schema/api.graphql @@ -1077,7 +1077,7 @@ type Tag { type TaskDefinition implements Node { concurrentExecLimit: Int - createTime: String + createdAt: String createdBy: String description: String id: ID! @@ -1095,7 +1095,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 16e12020..3afa40d6 100644 --- a/src/schema/nexus-typegen.ts +++ b/src/schema/nexus-typegen.ts @@ -1631,7 +1631,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! @@ -1649,7 +1649,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: { @@ -2396,7 +2396,7 @@ export interface NexusGenFieldTypeNames { TaskDefinition: { // field return type name concurrentExecLimit: 'Int'; - createTime: 'String'; + createdAt: 'String'; createdBy: 'String'; description: 'String'; id: 'ID'; @@ -2414,7 +2414,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(), });