craftcms / gatsby-source-craft

Gatsby source plugin for Craft CMS.
MIT License
54 stars 13 forks source link

Extending options to allow customizing fetch options / added request retry to make plugin more failure resistant to temporary network failure, server timeouts, etc... #71

Closed kije closed 2 years ago

kije commented 2 years ago

Description

This small PR adds two options to the plugin:

In addition, it wraps the fetch call to the GrapQL API in a p-retry, so that the user can specify a retry behavior with the above mentioned retryOptions option. Note: the default value for retryOptions was set to { retries: 1 } to minimize change in behaviour to the plugin.

Related issues

https://github.com/craftcms/gatsby-source-craft/issues/67

kije commented 2 years ago

@andris-sevcenko thanks for the Feedback! Sure, I've just updated the my branch

andris-sevcenko commented 2 years ago

Thanks, @kije!