Json – Use data from graphql response in React
I guess this is a simple issue, but I am stuck here for a while, so any advice may be helpful! I have a react app and I am calling a GraphQL api (with apollo). Inside an arrow function component…
I guess this is a simple issue, but I am stuck here for a while, so any advice may be helpful! I have a react app and I am calling a GraphQL api (with apollo). Inside an arrow function component…
I have a parent functional component named Dashboard and a child class component named DashboardTable. I'm making a graphql call in the parent class and want to pass the result into the child like this <DashboardTable data={opportunityData}/>. problem: I can…
:) I am starting a new Laravel project with Lighthouse and have been problems with resolving non root fields. According to the documentation here for each of the fields that have complex types, there should be a model and a…
I query 'product' on one of my screens using the following function const getProduct = async () => { try{ if(userId){ await DataStore.query(Product, c=>c.userID("eq", userId)).then(setProducts) } }catch(e){ return } }; But what I want is to display something like an…
Package info: "@apollo/client": "^3.6.8", "apollo-link-logger": "^2.0.0", "apollo-link-token-refresh": "^0.4.0", "graphql": "^16.5.0", "graphql-tag": "^2.11.0", "react": "17.0.2", "react-native": "=0.68.0", I am making sequential requests in React.FC by calling Apollo client repeatedly, awaiting each request. const loadData = async() => { await wait(800); await…
how can I sort by related column in laravel lighthouse graphql? For example, I have Products that have One Category but I can't SortBy Category. How can I do that? GraphQL getProducts(orderBy: _ @orderBy): [Product!]! @all type Product { id:…
I'm having an issue with generating meta tags for my Next.js blogging application. I am currently using Typescript and apollo-codegen to generate query hooks to fetch information from my Strapi backend. Because i've read on many other posts that dynamic…
I have a model Book with a field "tags" which is of type array of String / GraphQLString. Currently, I'm able to query the tags for each book. { books { id tags } } and I get the result:…
I just want to avoid use of custom/manual resolvers in appsync completely. So I'm using Amplify to setup GraphQL appsync API in my app. I'm doing all the stuffs by changing schema.graphql and amplify push. I have 2 questions :…
Hi i am trying to fetch data from sanity CMS and then pass it with props to my child component . but its not working. The same thing and code worked on my other screen but here I am getting…