Gomah / nuxt-graphql-request

Easy Minimal GraphQL client integration with Nuxt.js.
https://nuxt-graphql-request.vercel.app
MIT License
196 stars 16 forks source link

Feature request: Retry request on fail #57

Open drewbaker opened 1 year ago

drewbaker commented 1 year ago

I know that the point of GQL request is to be very simple, so maybe this is not within scope... but man I'd love retry to be built into this module!

Something like this:

  graphql: {
    clients: {
      default: {
          retry: {
            attempts: 3,
            delay: 1000         
          }
      }
    }
}    

And when the request fails for any reason, it waits 1000 between each retry 3 times, before really failing.

The thing is, I actually really want these for some old Nuxt2 projects that fail SSG builds due to a slow-to-scale API.

Gomah commented 3 months ago

It's coming soon, currently in alpha: https://github.com/jasonkuhrt/graphql-request/issues/878