(type: Type)
| 21 | } |
| 22 | |
| 23 | export const _get = <Type extends ApiType>(type: Type) => <Arg, Res, Progress = void>( |
| 24 | schema: Schema<Arg>, |
| 25 | func: ApiCall<Type, Arg, Res, Progress>['func'], |
| 26 | hooks: ApiCall<'Query', Arg, void, void>[] = [], |
| 27 | ): ApiCall<Type, Arg, Res, Progress> => ({ input: schema, func, hooks, type } as const); |
| 28 | |
| 29 | export const Query = _get('Query'); |
| 30 | export const Mutation = _get('Mutation'); |