Skip to content

Commit

Permalink
task definitions createdAt, updatedAt fix (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
soson authored Jul 27, 2023
1 parent 3f9237a commit b6278b2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/schema/api.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ type Tag {

type TaskDefinition implements Node {
concurrentExecLimit: Int
createTime: String
createdAt: String
createdBy: String
description: String
id: ID!
Expand All @@ -1095,7 +1095,7 @@ type TaskDefinition implements Node {
retryLogic: RetryLogic
timeoutPolicy: TaskTimeoutPolicy
timeoutSeconds: Int!
updateTime: String
updatedAt: String
updatedBy: String
}

Expand Down
8 changes: 4 additions & 4 deletions src/schema/nexus-typegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand All @@ -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: {
Expand Down Expand Up @@ -2396,7 +2396,7 @@ export interface NexusGenFieldTypeNames {
TaskDefinition: {
// field return type name
concurrentExecLimit: 'Int';
createTime: 'String';
createdAt: 'String';
createdBy: 'String';
description: 'String';
id: 'ID';
Expand All @@ -2414,7 +2414,7 @@ export interface NexusGenFieldTypeNames {
retryLogic: 'RetryLogic';
timeoutPolicy: 'TaskTimeoutPolicy';
timeoutSeconds: 'Int';
updateTime: 'String';
updatedAt: 'String';
updatedBy: 'String';
};
TaskDefinitionConnection: {
Expand Down
4 changes: 2 additions & 2 deletions src/schema/task-definitons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
});
Expand Down

0 comments on commit b6278b2

Please sign in to comment.