Add publishedAt to the updatePageInput

This commit is contained in:
Hongbo Wu 2023-03-02 13:40:59 +08:00
parent d96f0fefbb
commit bd12ecd7ec
4 changed files with 4 additions and 0 deletions

View file

@ -2813,6 +2813,7 @@ export type UpdatePageInput = {
byline?: InputMaybe<Scalars['String']>;
description?: InputMaybe<Scalars['String']>;
pageId: Scalars['ID'];
publishedAt?: InputMaybe<Scalars['Date']>;
savedAt?: InputMaybe<Scalars['Date']>;
title?: InputMaybe<Scalars['String']>;
};

View file

@ -2166,6 +2166,7 @@ input UpdatePageInput {
byline: String
description: String
pageId: ID!
publishedAt: Date
savedAt: Date
title: String
}

View file

@ -41,6 +41,7 @@ export const updatePageResolver = authorized<
description: input.description ?? undefined,
author: input.byline ?? undefined,
savedAt: input.savedAt ? new Date(input.savedAt) : undefined,
publishedAt: input.publishedAt ? new Date(input.publishedAt) : undefined,
}
const updateResult = await updatePage(input.pageId, pageData, { ...ctx, uid })

View file

@ -565,6 +565,7 @@ const schema = gql`
description: String
byline: String
savedAt: Date
publishedAt: Date
}
type UpdatePageSuccess {