-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[gatsby-source-contentful] Add Support for preview api #1464
[gatsby-source-contentful] Add Support for preview api #1464
Conversation
Deploy preview ready! Built with commit 7b58e16 |
Deploy preview ready! Built with commit 7b58e16 |
Deploy preview ready! Built with commit 7b58e16 |
Is there any other possible hosts? Any reason to not just add a "preview" option that defaults to |
Changed my mind again actually :-) "preview" is an abstraction that doesn't add much value and possibly confuses people as it's not what they'd expect from reading the docs. Also y'all at Contentful could add another endpoint in the future so this would get in the way of that. |
Thanks for the upgrades! |
Sorry for the later reply (time zone), the host param can be very useful for a user having another proxy server on top contentful, also might be useful for our internal testing at contentful, like getting data from staging or localhost. Thanks for the merge |
Summary
This PR extends the contentful source plugin with the option to provide a host to the contentful client which is useful when trying to test your drafts using the Contentful Preview API.
Limitation
Due to the preview API limitation, only initial sync is possible now, you will be getting all the data every time you build when using the preview API. Which should be fine for now.
check #1448 for more info