Blog

Orval: REST client generation, CORS mutators for fetch and axios, and OpenAPI tags mapped to hooks

Orval mutators let you inject CSRF tokens and tracing headers—ensure they match Allow-Headers on the gateway.

1 min read
orvalopenapicors

React Query

Generated hooks share query keys—invalidate CORS-sensitive queries after auth refresh.

Suspense boundaries may mask CORS errors in waterfalls—surface error boundaries in dev.

Zod

When combining Orval with Zod validation, reject invalid payloads before fetch to save noisy preflights.

Schema drift between backend and client can cause 400s mistaken for CORS in SPAs.

Back to blog