Tag: #reactjs
-
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…
-
What is the npm command to build and create package of Apollo Grapphql server application?
0 What is the npm command to build and create package of Apollo Grapphql server application? I am using nodemon start command to run the application. But I want to create package and publish it in the server. Which npm command we can use for build and packaging? I am using nodemon start command to…
-
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…
-
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…
-
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…
-
How can I show a message to the user when in the browser the request sends a 504 gateaway timeout?
0 Right now when I send a request with multiple collections, the browser chrome shows me a 504 timeout ‘cos it has taken more than 60 seconds. The client has asked me to display a new message to the user when this issue happens. I’m a bit lost as this is the first time that…
-
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…
-
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…
-
Gatsby GraphQL Error: Cannot query field “dogs” on type “Query”
0 I created a custom post type in WordPress and would like to build pages for it. When I try out the queries in the IDE they pull the custom post data ok. When I add it to the code, however, it throws the error Cannot query field "dogs" on type "Query" when I build…