粒粒橙

Results 12 comments of 粒粒橙

I don't think storing the promise in cache is a good idea. How do you deal with promise rejection? @StarpTech What do you think?

I have submitted a PR #37 memoizing promises and it looks good.

I think we should use [`DataLoader`](https://github.com/graphql/dataloader) for batching and caching in a single request. I am writing something like this as a workaround. Maybe I'll make a PR for this...

You should manipulate `request.path` directly in `onRequest`. In my situation, to sign the query string with a function: ``` protected async onRequest(request: Request): Promise { request.path = request.path.split('?')[0] + '?'...

I have made the argument of `onRequest` to be `Dispatcher.RequestOptions` which doesn't include `query` field. User will have no access to `request.query` and have to manipulate the query string in...

Actually, you can't. ```typescript export interface KeyValueCache { get(key: string): Promise; set(key: string, value: V, options?: KeyValueCacheSetOptions): Promise; delete(key: string): Promise; } export interface DataSourceConfig { context: TContext; cache: KeyValueCache;...

+1 on this feature