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

[gatsby-source-contentful] Add Support for preview api #1464

Merged
merged 1 commit into from
Jul 12, 2017
Merged

[gatsby-source-contentful] Add Support for preview api #1464

merged 1 commit into from
Jul 12, 2017

Conversation

Khaledgarbaya
Copy link
Contributor

@Khaledgarbaya Khaledgarbaya commented Jul 11, 2017

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

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit 7b58e16

https://deploy-preview-1464--gatsbyjs.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit 7b58e16

https://deploy-preview-1464--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview ready!

Built with commit 7b58e16

https://deploy-preview-1464--gatsbygram.netlify.com

@KyleAMathews
Copy link
Contributor

Is there any other possible hosts? Any reason to not just add a "preview" option that defaults to false?

@KyleAMathews
Copy link
Contributor

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.

@KyleAMathews
Copy link
Contributor

Thanks for the upgrades!

@KyleAMathews KyleAMathews merged commit e0b6035 into gatsbyjs:master Jul 12, 2017
@Khaledgarbaya Khaledgarbaya deleted the cf/add-preview-host branch July 12, 2017 07:30
@Khaledgarbaya
Copy link
Contributor Author

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

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.

3 participants