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

Do we still need the MatchFields and enablePartialUpdate options in config? #183

Closed
drooJohnson opened this issue Sep 13, 2023 · 2 comments

Comments

@drooJohnson
Copy link

drooJohnson commented Sep 13, 2023

Hello! I'm working in a project that was started before this plugin reached v1.0.0, and while reading through the changelog I noticed that the matchFields and enablePartialUpdates options don't appear anywhere in the source code of this repo, and it seems like they're no longer used.

Are we good to just remove them from our gatsby-config.js, or do we need to keep them around to ensure the behavior of the plugin doesn't change from what we were expecting?

The current values are:

enablePartialUpdates: true,
matchFields: ['identifier','modified'],

These look like the default values for older versions of the plugin, but I'm having trouble understanding exactly the process of how we should move from pre v1.0.0 versions of the plugin, and the current version of the plugin. This passage in particular left me a little puzzled.

For migrating to v1 version smoothly:

add id instead of objectID in your query
query for internal { contentDigest } and do not transform it
set enablePartialUpdates to true
set matchFields to ['internal.contentDigest']

Are we intended to do those things before we upgrade to v1+ to match the behavior we should expect by default in v1+, or are those the steps we need to take once we upgrade to v1+. Thanks in advance for the clarification!

@Haroenv
Copy link
Contributor

Haroenv commented Sep 13, 2023

Sorry that's unclear! happy to take a PR in clarifying the text. It means that before you update to v1, you do a final index with those changes made in your configuration, which then will have the same settings as v1 will use. Then you can update and do more indexing as before.

hope that helps!

@drooJohnson
Copy link
Author

No worries, greatly appreciate the clarification! I honestly don't know if there's a better way to word it, I suspect my misunderstanding is an outlier. Thank you!

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

No branches or pull requests

2 participants