Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip updates for webhooks upserts #152

Open
Simply007 opened this issue Jul 23, 2020 · 1 comment
Open

Skip updates for webhooks upserts #152

Simply007 opened this issue Jul 23, 2020 · 1 comment
Labels
enhancement New feature or request groomed hacktoberfest help wanted Extra attention is needed source-plugin Marking issues related to @kentico/gatsby-source-kontent. up-for-grabs

Comments

@Simply007
Copy link
Contributor

Motivation

Check modified date of the updated item vs modified date of an item that is already in the graphql model.

Proposed solution

Do not make an update if the latest version is already pushed.

Additional context

When there are a lot of changes in one node, some of the updates could load the latest version sooner so that it is not necessary to reupdate the same content again.
It should help the processing and save some RTE updates.

@Simply007 Simply007 added the enhancement New feature or request label Jul 23, 2020
@Simply007 Simply007 self-assigned this Jul 23, 2020
@Simply007 Simply007 removed their assignment Sep 2, 2020
@Simply007 Simply007 added groomed hacktoberfest help wanted Extra attention is needed up-for-grabs source-plugin Marking issues related to @kentico/gatsby-source-kontent. labels Sep 2, 2020
@Simply007
Copy link
Contributor Author

In the webhook message, there is just the information, when the webhook was triggered not the last modified date at that time + since the webhooks receiving does not preserve order, this date should not be used nor overriding last modified date.

It is necessary to load Kontent Item for every upsert webhook and then decide whether to perform an update by comparing system.last_modified of the already created Node vs. newly loaded data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request groomed hacktoberfest help wanted Extra attention is needed source-plugin Marking issues related to @kentico/gatsby-source-kontent. up-for-grabs
Projects
None yet
Development

No branches or pull requests

1 participant