Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

DEVHUB-1938 pulling original publish date from publish metadata colle… #645

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

harikakotipalli
Copy link
Collaborator

pulling original publish date from publish metadata collection
https://jira.mongodb.org/browse/DEVHUB-1938

Backend PR : https://github.com/10gen/devcenter-backend/pull/127

A new collection "Publish Metadata" is created in contentstack which will store the publish date of the article when published from "ContentStack". There is a realm webhook to create metadata entry upon publishing which needs to be migrated later as captured in https://jira.mongodb.org/browse/DEVHUB-1938

Copy link
Collaborator

@mcolella14 mcolella14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but just curious about latency.

@@ -26,7 +70,7 @@ export const CS_getArticleBySlugFromCMS = async (
client,
variables
)) as CS_ArticleResponse[];

await CS_adjustOriginalPublishDate(client, calculatedSlug, articles);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a sense of how this will affect page speed? Seems like fetching both all articles and all publish metadata might add some time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will add some time - let me check the metrics -
there are 2 other options

  1. get from preval - which might be stale
  2. combine the graphql query - like a join

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants