Progressive Enhancement Meets Apollo GraphQL
Progressive enhancement is rarely associated with the most JavaScript-heavy corners of front-end development, yet it’s exactly where one developer has made it work.
Kitty Giraudel, who already uses server-side rendering, tackled the problem with a button inside a JSX React component. That button had a click handler firing a data mutation through Apollo GraphQL—about as hostile an environment for progressive enhancement as it gets.
Since a form is the only way to post data without JavaScript, Giraudel’s approach leans on one. The form submits directly to the /graphql endpoint, carrying the mutation’s data via hidden inputs, along with extra information dictating where to redirect on success or failure.
Hidden inputs, form submission, and GraphQL mutations sharing a pipeline—pretty neat.



