Tag: graphql
-
AWS AppSync Subscription to Mutation with object as input struggle
0 I want to create an EventBridge Rule that should trigger a a GraphQL Subscription over Appsync. Everything worked fine until I changed Service from an object to a string. My GraphQL Schema looks like this: input nestedObjectInput { A: String B: String } type simpleReturn { Name: String Service: nestedObject } type Mutation {…
-
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 to send a file in the request body for GraphQL API and Spring-boot application using postman?
0 I am using graphQL for my APIs and now I need to receive a file in the request as a multipart file, so how to send that file using Postman to my controller? @Data public class FileDTO { private MultipartFile smsFile; } @Controller public class SMSBulkController { @Autowired ParsingService parsingService; @MutationMapping public ApiResponse<String> uploadFile(@Argument…
-
Use dynamically type of generic
0 export const createBill = /* GraphQL */ `mutation CreateBill( $input: CreateBillInput! $condition: ModelBillConditionInput ) { createBill(input: $input, condition: $condition) { periodStart periodEnd energy senderId receiverId metering_point_number file_key customer_number bill_number paid interval id createdAt updatedAt __typename } } ` as GeneratedMutation< APITypes.CreateBillMutationVariables, APITypes.CreateBillMutation >; I have this graphql query wich is automatically generated. Now i…
-
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": {…
-
React-native AWS amplify graphQl Subscription
0 In my react native project, I am using graphQl subscription with aws-amplify. The problem is it’s not getting notified/called when the backend sends a notification. The backend developer told me, that from their side notification is sending correctly. Now from the Front end side setup is also properly done because one other subscription is…
-
Validation error of type SubSelectionRequired: Sub selection required for type null of field
36 I am working on a graphql issue where I am getting following error for the request { customer(id: “5ed6092b-6924-4d31-92d0-b77d4d777b47”) { id firstName lastName carsInterested } } “message”: “Validation error of type SubSelectionRequired: Sub selection required for type null of field carsInterested @ ‘customer/carsInterested'”, Below is my schema type Customer { id: ID! firstName: String!…