graphql-client
graphql-client copied to clipboard
Support for Middleware?
Is there any idea for adding middleware to the client? I think it would be interesting, for example, to support query caching, retries, logging, etc.
Couldn’t you do that with a custom HTTP client layer, the same way you have to do with authentication (especially to something like AWS AppSync using Cognito IDP)?
That's a good point. I hadn't thought of making a custom network layer instead, but yes, a custom network adapter could also handle inserting middleware/etc. Maybe the project should have more docs on how to make custom network adapters.