()
| 10 | }; |
| 11 | |
| 12 | export const useRequestProtocol = (): ResolvedRequestProtocol => { |
| 13 | const client = useQueryClient(); |
| 14 | const { requestMethod, fetchMethod, isCompanion } = |
| 15 | client.getQueryData<RequestProtocol>(REQUEST_PROTOCOL_KEY) || {}; |
| 16 | |
| 17 | return useMemo( |
| 18 | () => ({ |
| 19 | requestMethod: requestMethod || gqlRequest, |
| 20 | fetchMethod: fetchMethod || fetch, |
| 21 | isCompanion, |
| 22 | }), |
| 23 | [requestMethod, fetchMethod, isCompanion], |
| 24 | ); |
| 25 | }; |
no outgoing calls
no test coverage detected