Tag: fetch
-
Is there a more efficient way to call multiple apis using graphql and react
0 I am using GraphQL and react on my client side project but I am not using a state management system like Redux I have organised my api calls into custom hook files like below const [getSomeData, { data: getSomeDataData, loading: getSomeDataLoading, error: getSomeDataError }] = useLazyQuery( GET_SOME_DATA2, { client: dataClient, fetchPolicy: "cache-and-network", nextFetchPolicy: "cache-first",…
-
Failed to fetch error – ReactJS + GraphQL [closed]
-2 Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 1 hour ago. Improve this question We get "Failed to fetch" error when…
-
Why the error `Failed to execute ‘text’ on ‘Response’: body stream already read` if I’m re-assigning res.json?
1 I’m trying to use the code I found here for APQ (automatic persisted queries) and graphql-request. But if I use the code like described: export const graphQLClient = new GraphQLClient("https://localhost:3000", { fetch: createPersistedQueryFetch(fetch), }); I’m getting this error in browser’s console: TypeError: Failed to execute ‘text’ on ‘Response’: body stream already read at getResult…