Tag: #reactjs
-
Why is my GQL function getting called repeatedly? [closed]
0 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 I am now using React and Apollo…
-
How can I use this graphQL DTO in my react app?
0 I have been given a task that I have to use a query and download a pdf when I click on a button. The thing is that I’m new to graphQL and the backend guy has just sent to me this type Query{ getCollectionReportOverview(filterReportCollectionOverview:ReportCollectionOverview ): String! } input ReportCollectionOverview { collectionNumbers: [Int]! collectionNames: [String]!…
-
How can I use this grapql DTO n my react app?
0 I have been given a task that I have to use a query and download a pdf when I click on a button. The thing is that I’m new to graphQL and the backend guy has just sent to me this type Query{ getCollectionReportOverview(filterReportCollectionOverview:ReportCollectionOverview ): String! } input ReportCollectionOverview { collectionNumbers: [Int]! collectionNames: [String]!…
-
How to set initialState using Redux Toolkit with data using Apollo’s useQuery?
0 I am trying to call the useQuery hook (something not allowed outside of functional components), in a redux toolkit slice. Is this something that is doable, perhaps using createAsyncThunk or some similar method? My application is built with the MERN stack, so my database is MongoDB, and I’m using Graphql to fetch the data.…
-
Material UI Sortable Table not working: Error
0 I’ve been following the Sorting & selecting section of this component. Worked great with fake data but now I’m trying to pass my real object through I’m getting an error I’m struggling to figure out (NB: I’m new to react / typescript). The Error: Argument of type ‘EventAudit[]’ is not assignable to parameter of…
-
With Apollo Graphql, is it the same having a field as null and not sending it?
0 I am implementing a React Typescript app that communicates to a Kotlin backend using GraphQL (Apollo on the Frontend). My mutation is : updateProfile(input: UpdateProfileInput) input UpdateProfileInput { firstName: String lastName: String email: String } I am supposed to send as an input only the fields that have been changed. So I should not…
-
Testing graphql query in react error: TypeError: (0 , _client.gql) is not a function
0 I have this graphql query: export const LOAD_PLAYERS = gql` query GetPlayers { players { id firstname lastname shortname sex picture { url } country { code picture { url } } stats { rank age weight height points } } } `; I’m using it in this custom hook and it works just…