Tag: apollo-client
-
React: Not able to run graphql mutations in redux even though I am able to run it within the component
-1 I am currently working on a project in which GraphQL is being implemented for the first time and initially I only had to run GraphQL mutations within the component(using Apollo-client and it’s hook – useMutation) that I was working on and all was well. Now, I am trying to have the mutation in the…
-
Apollo Client gql lte, gte null values Issue
0 I have this query using to query from a graphql subgraph. I use apollo client in my Next.js front-end to query data. This is my query: const DOMAIN_FIELDS = gql` fragment DomainFields on Domain { expires id isListed name listingPrice listingExpiresAt lastSalePrice owner tokenId seller } `; export const GET_DOMAINS = gql` ${DOMAIN_FIELDS} query…
-
Posting Image to wordpress through Apollo client and GraphQL
0 I’m currently facing a challenge with React Native related to file uploads. I’m working with a WordPress backend that uses GraphQL, and for file uploading, I’m relying on the wp-graphql-upload plugin available on GitHub. This plugin requires the submission of actual file objects, but React Native inherently doesn’t support direct file submissions – it…
-
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…
-
Set up dynamic routes in Astro with GraphQL fragments query doesn’t work
0 I am trying to setup dynamic routes in Astro SSR mode. From the api I can use the following query (it contains fragments): I am using Apollo Client. const GET_PAGE = gql` query Page($target: String!) { page(target: $target) { type content { … on PageOne { url: anotherKey title: anotherTitleField id } … on…
-
Set up dynamic routes in Astro SSR mode
0 I try to create dynamic routes in astro SSR mode. I am using Apollo client. I have this grapql query from the api: const GET_PAGE = gql` query Page($target: String!) { page(target: $target) { type content { … on MyPage { id url } } } } `; So based on the target variable…
-
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…