wundergraph.andert.me/.wundergraph/wundergraph.operations.ts

33 lines
728 B
TypeScript
Raw Permalink Normal View History

2022-11-03 08:54:01 +00:00
import { configureWunderGraphOperations } from "@wundergraph/sdk";
import type { OperationsConfiguration } from "./generated/wundergraph.operations";
2022-10-28 12:42:05 +00:00
export default configureWunderGraphOperations<OperationsConfiguration>({
2022-11-03 08:54:01 +00:00
operations: {
defaultConfig: {
authentication: {
required: false,
},
},
queries: (config) => ({
...config,
caching: {
enable: false,
staleWhileRevalidate: 60,
maxAge: 60,
public: true,
},
liveQuery: {
enable: true,
pollingIntervalSeconds: 1,
},
}),
mutations: (config) => ({
...config,
}),
subscriptions: (config) => ({
...config,
}),
custom: {},
},
2022-10-28 12:42:05 +00:00
});