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

document fetchOptions #206

Closed
wants to merge 4 commits into from
Closed

document fetchOptions #206

wants to merge 4 commits into from

Conversation

kostasb
Copy link
Contributor

@kostasb kostasb commented Jan 4, 2024

Closes #200

@xata-bot
Copy link

xata-bot commented Jan 4, 2024

Check out the preview at https://xata-docs-pr-206.vercel.app

Copy link
Contributor

@joan-ing joan-ing left a comment

Choose a reason for hiding this comment

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

lgtm

fix revalidate period
@kostasb
Copy link
Contributor Author

kostasb commented Jan 5, 2024

Let's not merge this yet. While fetchOptions does its part from the SDK side, we haven't been able to verify the cache actually works with these.


The Xata SDK supports the `fetchOptions` parameter for passing options to fetch.

This parameter can be used to configure cache revalidation at a timed interval:
Copy link
Member

Choose a reason for hiding this comment

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

I'd make this more clear it's only for Next.js

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will add clarifications once we have findings from xataio/client-ts#1311 as it doesn't seem to actually work as documented, maybe there's more steps needed in Next.js.

@kostasb
Copy link
Contributor Author

kostasb commented Jan 9, 2024

I will close this PR until we figure out additional guidelines required from xataio/client-ts#1311 , as merging as-is is unlikely to help users.

@kostasb kostasb closed this Jan 9, 2024
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

Successfully merging this pull request may close these issues.

[NEW]: fetchOptions in TS SDK
4 participants