This time, we're making changes to the
wundergraph.operations.ts file. As the file name indicates, it's used to configure Operations.
First, we have to set defaults for Queries, Mutations and Subscriptions. For the Queries, we're configuring default values, like
staleWhileRevalidate, but keep caching disabled by default.
custom property, we can override the config for individual Operations using an arrow function. In this case, we enable caching for the Dragons Query.
As a result, your WunderGraph server will now cache the
Dragons Query as per the configuration. Additionally, we'll add Cache-Control headers to the response, which means that Browsers, Proxies and CDNs will be able to cache the response.
Deploy to WunderGraph Cloud
The easiest way to deploy your WunderGraph app is to use WunderGraph Cloud.