Merge pull request #1852 from omnivore-app/add-pubslished-at-to-update-page-input

Add publishedAt to the updatePageInput
This commit is contained in:
Hongbo Wu 2023-03-03 09:26:41 +08:00 committed by GitHub
commit 03cc2278ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 {