diff options
Diffstat (limited to 'source/library/fetcher')
| -rw-r--r-- | source/library/fetcher/apq.ts | 3 | ||||
| -rw-r--r-- | source/library/fetcher/sse.ts | 12 |
2 files changed, 12 insertions, 3 deletions
diff --git a/source/library/fetcher/apq.ts b/source/library/fetcher/apq.ts index 7f9f3c1..854017b 100644 --- a/source/library/fetcher/apq.ts +++ b/source/library/fetcher/apq.ts @@ -54,7 +54,7 @@ export function createApqFetcher(options: ApqOptions): Fetcher { }; } -/*** INTERNAL ----------------------------------------- ***/ +/*** HELPER ------------------------------------------- ***/ async function getHash(cache: Map<string, string>, query: string): Promise<string> { const cached = cache.get(query); @@ -64,6 +64,7 @@ async function getHash(cache: Map<string, string>, query: string): Promise<strin const hash = await sha256Hex(query); cache.set(query, hash); + return hash; } diff --git a/source/library/fetcher/sse.ts b/source/library/fetcher/sse.ts index c28436b..73a2da6 100644 --- a/source/library/fetcher/sse.ts +++ b/source/library/fetcher/sse.ts @@ -3,11 +3,19 @@ /*** IMPORT ------------------------------------------- ***/ -import { createClient, type Client, type ClientOptions } from "graphql-sse"; +import { + createClient, + type Client, + type ClientOptions +} from "graphql-sse"; /*** UTILITY ------------------------------------------ ***/ -import type { Fetcher, FetcherOptions, FetcherResult } from "./types.ts"; +import type { + Fetcher, + FetcherOptions, + FetcherResult +} from "./types.ts"; /*** EXPORT ------------------------------------------- ***/ |