From e1668cb6cdf5d34d3d987ab93c43f7c5dfce77da Mon Sep 17 00:00:00 2001 From: Nithin Kumar B Date: Thu, 3 Nov 2022 14:23:54 +0530 Subject: [PATCH] add post resolve hook --- .wundergraph/wundergraph.server.ts | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.wundergraph/wundergraph.server.ts b/.wundergraph/wundergraph.server.ts index 1015fa7..d167ec4 100755 --- a/.wundergraph/wundergraph.server.ts +++ b/.wundergraph/wundergraph.server.ts @@ -1,11 +1,17 @@ -import {configureWunderGraphServer} from '@wundergraph/sdk'; -import type {HooksConfig} from './generated/wundergraph.hooks'; -import type {InternalClient} from './generated/wundergraph.internal.client'; +import { configureWunderGraphServer } from "@wundergraph/sdk"; +import type { HooksConfig } from "./generated/wundergraph.hooks"; +import type { InternalClient } from "./generated/wundergraph.internal.client"; export default configureWunderGraphServer(() => ({ - hooks: { - queries: {}, - mutations: {}, + hooks: { + queries: { + Weather: { + postResolve: async (hook) => { + hook.log.info("postResolve hook for Weather"); + }, + }, }, - graphqlServers: [] + mutations: {}, + }, + graphqlServers: [], }));