Tag: #reactjs
-
How can I upload file in Apollo server V4
7 I’m using the newer version of apollo server V4, I need assistance on how to upload images or videos from Frontend to cloudinary and save the url to MongoDB database… please help 🙏 I have read through Apollo docs but there are no answers there… I’m kind of stuck now reactjs express graphql apollo-server…
-
why how can i fix the error: variable XX not found with hydrogen and codegen?
0 I am very new to hydrogen / react in general. I am playing around with hydrogen 2 and the base app they install when setting up a site. Playing around with the ($locale).products.$handle.jsx file I have created an extension to the product query which grabs a few new meta fields. I then import that…
-
@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…
-
React Admin with ra-data-hasura Error: Unknown resource . Make sure it has been declared on your server side schema
0 I’m using React Admin with GraphQL and ra-data-hasura. My problem is that the Introspection Query is made only when the app starts (user has role guest before login) and after login, the Introspection Query does not refetch, so I get errors for the resources that the logged in user should have access to. After…
-
Conditionally render an Astro component based on page type query
0 I am using Astro, GraphQL (Apollo Client), Typescript and React. In my dynamic route: […slug].astro file I need to conditionally render a certain Astro component. I managed to that with: {data.page.type === ‘PageOneType’ && <PageOne />} {data.page.type === ‘PageTwoType’ && <PageTwo />} Can I somehow make this more dynamic, so I don’t have to…
-
How to show Astro component based on a certain field and map the correct data and Astro component in the dynamic slug page
0 I am using Astro, GraphQL (Apollo Client), Typescript and React. For now I think don’t need React yet. I have a dynamic route: […slug].astro I have the following query: export default gql` query Page($pageTarget: String!) { page(pageTarget: $pageTarget) { type content { … on PageOne { id title } … on PageTwo { id…
-
How can I display a pdf using a graphQL query and react?
-1 My task is to use a query, send the mandatory variables and get a pdf from the BE. Right now, I have the code but I can’t get the pdf downloaded. In the network tab I can see my request and the response is a url as string This is the request: query getCollectionReportOverview(…
-
When using GraphQL and Relay and Fragment, how to see the data?
0 I am onto Step 4 of the Relay Tutorial at: https://relay.dev/docs/tutorial/fragments-1/ It was strange because when I don’t use Fragment, and have the following code: const data = useLazyLoadQuery<NewsfeedQueryType>( NewsfeedQuery, {} ) console.log("HERE 1", JSON.stringify(data, null, 4)); I was able to see in the dev console for the data: HERE 1 { "topStory": {…
-
How can I use my query from graphQL and get pdf downloaded?
-1 My task is to use a query, send the mandatory variables and get a pdf from the BE. Right now, I have the code but I can’t get the pdf downloaded. In the network tab I can see my request but nothing in the response. This is the request: query getCollectionReportOverview( $filterReportCollectionOverview: ReportCollectionOverviewInput! )…