Tag: apollo-client
-
How to use graphql with remix.run
0 I have an endpoint https://localhost:1337/graphql where i query a lot of things from strapi but i am trying to use remix.run (tsx) as. my framework, there are no latest tutorials as to how to integrate the graphql endpoint to the remix loaders so that i can query directly from the graphql endpoint. export async…
-
Track image upload progress in graphql mutation
0 I am running a graphql mutation to upload an image to the server. And operation is done successfully. My only question is that how do i track the progress of image upload on frontend? What percentage of the image size is uploaded? I want to show it in the progressbar in the frontend. Below…
-
AppSync subscriptions with ApolloClient in React
8 I’m currently using ApolloClient to connect to an AppSync GraphQL API. It all works perfectly for queries and mutations, but I’m having some trouble getting subscriptions to work. I’ve followed the Apollo docs and my App.js looks like this: import React from ‘react’; import ‘./App.css’; import { ApolloClient } from ‘apollo-client’; import { ApolloProvider…
-
Astro dynamic routing (SSR mode) and 404 page
0 I am using Astro and Apollo client to fetch data using GraphQL. In Astro I am using SSR only. I have set up the following Astro dynamic routing (SSR mode): // […slug].astro — import Page from ‘../components/page/Page.astro’; import Layout from ‘../layouts/Layout.astro’; — <Layout title="Test"> <Page /> </Layout> And Page.astro: // Page.astro — import PageOne…
-
GraphQL/APOLLO – Cannot query field “field_name” on type “Query”
0 I am trying to make a query like this in the latest apollo/server 4.9 and graphqlClient – 3.7 like below: const USER_DATA = gql` query getUserData($subdomain: String!) { getUserData(subdomain: $subdomain) { _id full_name email valid_complex_password projects { _id image_url title description street_address city province country } } } but keep getting this: { "errors":…
-
Not able to run GraphQL mutations in Redux even though I am able to run it within the component [closed]
-2 Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 13 mins ago. Improve this question I am currently working on a project in which GraphQL is being implemented for the first time and initially…
-
GraphQL Codegen isn’t generating types from the in-line fragments
-1 I am using Apollo Client 3 and GraphQL Codegen. I have the following query: query Page($path: String!) { page(path: $path) { id content { …on PageOne { id description } …on PageTwo { id title } } } } My codegen config file: // codegen.ts import type { CodegenConfig } from ‘@graphql-codegen/cli’; const config:…
-
GraphQL – Apollo Client without using hooks?
11 I am attempting to use the Apollo GraphQL Client for React Native. However, in some parts of my app I need to do a mutation on the GraphQL data, in such a way that the interface should not be exposed to the user. For instance, on my sign up page, I want to create…
-
Apollo gql, get loading state when polling
0 I am using @apollo/client v3. I want to get loading state when requests will happen from polling but it is not working as I expect. This is my query const { data, loading } = useQuery(SOME_QUERY, { variables: { variable: "value", }, 10000 //poll interval }); I wrote useEffect to catch if it is…