Tag: react-apollo
-
Variables of required type not provided despited their validity
2 I’m getting a GraphQL error I can’t seem to pinpoint the source of. Variable “$title” of required type “String!” was not provided. Variable “$body” of required type “String!” was not provided. Variable “$price” of required type “Int!” was not provided. The error message is simple. There are three required variables for this mutation and…
-
GraphQL Codegen issue: Unable to load template plugin matching ‘typescript-common’
-1 I am trying to setup GraphQL Code Generator. But I get this error: gql-gen –config codegen.ts ✔ Parse Configuration ⚠ Generate outputs ❯ Generate to src/graphql/generated/schema.ts ✔ Load GraphQL schemas ✔ Load GraphQL documents ✖ Unable to load template plugin matching ‘typescript-common’. Reason: Body must be a string. Received: undefined. ELIFECYCLE Command failed with…
-
@apollo/client in React, passing header is not working
0 I am trying to pass header in @apollo/client useQueryQuery but it is not getting passed. Click on login button will call loginRequest. Its a REST call which is using Graphql. IMPORTANT -> in loginRequest is getting called at many places, some places need to pass the header and some place not. Below I added…
-
How to refetch all queries after a mutation?
0 Using apollo graphql, I have a mutation that modify the "Person" object in the database All throughout the app, I have various queries to fetch that from "Person". Sometimes I need the whole object, sometimes only the name or the age. There is a list of persons (generated using the PERSON_IDS query) and when…
-
Duplicate requests when using apollo client in electron.js
0 In electron.js I have basic component that has two useQuery hooks. When the component re-renders the hooks fire and should result in 2 calls in the network tab. However there are 3 or sometimes 4 requests. Looks like the apollo cache is not working. If remove one hook and fire the other one multiple…