wundergraph.andert.me/.wundergraph/wundergraph.server.ts

17 lines
490 B
TypeScript
Raw Normal View History

2022-12-31 12:20:11 +00:00
import { configureWunderGraphServer } from "@wundergraph/sdk/server";
2022-11-03 08:53:54 +00:00
import type { HooksConfig } from "./generated/wundergraph.hooks";
import type { InternalClient } from "./generated/wundergraph.internal.client";
2022-10-28 12:42:05 +00:00
export default configureWunderGraphServer<HooksConfig, InternalClient>(() => ({
2022-11-03 08:53:54 +00:00
hooks: {
queries: {
2022-12-02 11:24:48 +00:00
Dragons: {
2022-11-03 08:53:54 +00:00
postResolve: async (hook) => {
2022-12-02 11:24:48 +00:00
hook.log.info("postResolve hook for Dragons");
2022-11-03 08:53:54 +00:00
},
},
2022-10-28 12:42:05 +00:00
},
2022-11-03 08:53:54 +00:00
mutations: {},
2022-12-31 12:20:11 +00:00
}
2022-10-28 12:42:05 +00:00
}));