# All channels
Sachin D. Shinde@sachin-shinde
Context headers insertion not working for the 1st query
I have a series of GraphQL queries that I'm firing off using useQuery of @apollo/react-hooks, and on every query, I'm injecting a new parameter called user into the context headers: Prior to firing off queries, I see that the user info was already stored in my cookie. However,…
Preventing CSRF with React, Apollo, GraphQL, and Spring boot
My team is developing a new application with React, Apollo, GraphQL, and Spring Boot. We are doing an OWASP security audit. I'm trying to figure out if this combination is vulnerable to CSRF attacks, and if so, how to prevent it. We have a bearer token in the header of our…
Pre-filled input box with useQuery data cant be erased
How should i handle a prefilled form with data comint from a useQuery. Ive got the form working with the data i need prefilled already but when i try to erase the name it always comes back to the value the query got. Im also using Lodash, here is my component.
useMutation always returns undefined ...
I want to create a user which has an adress using GraphQL mutations. When I try to log the data from the useMutation hook, the adress data is always undefined I am trying to create a user for my app. Each user has an adress. I am able to create an adress in my database. However,…
Problem with `IntrospectionFragmentMatcher` in `MockedProvider`
Hi! I am trying to use MockedProvider via Enzyme in order to test a component which uses the useQuery hook. In my test I have set up a mock which is being matched by my query – I can tell because I get the ApolloError: Network error: No more mocked responses for the query error…
I'm trying to set the context while refetching queries
I'm trying to set the context while refetching queries but it doesn't seem to be possible. I want to tell the server to skip the cache for some refetched queries, but there is no way to do this except for passing a _cache: false query prop and setting a header with…
Data not fetched correctly when returned from the cache.
Hi, I have a simple search control that refetches data from the Apollo server whenever user changes the search string. When, the query touches the server all is good. But when the data is returned from the cache, only the last server result is returned. Any idea? I am using…
Problem with the use of react apollo.
Recently I was tasked to maintain a codebase of a react app that uses apollo for graphQL. And it uses this pattern, where all the app is wrapped in two queries, each of them being updated with subscriptions. And in the rest of the app those queries are used (using a new Query…