0 I’m learning GraphQL and decided to develop a small application using GraphQL, Spring Boot 3.1.3, Java 20, and the spring-boot-starter-graphql library. One of the main features of GraphQL is the ability to specify which fields are needed. I found a simple solution to implement this in Java using a field fetcher by checking if […]
7 I have a string similar to the following my_string <- "apple,banana,orange," And I want to split by , to produce the output: list(c(‘apple’, ‘banana’, ‘orange’, "")) I thought strsplit would accomplish this but it treats the trailing ‘,’ like it doesn’t exist my_string <- "apple,banana,orange," strsplit(my_string, split = ‘,’) #> [[1]] #> [1] "apple" […]
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 { […]
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 […]
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 […]
16 The <chrono> library allows dates to silently fall into a state of !ok(). For example: #include <chrono> #include <iostream> int main() { using namespace std; using namespace chrono; auto date = 2023y/October/31; cout << date.ok() << ‘n’; date += months{1}; cout << date.ok() << ‘n’; } Output: 1 0 Demo. I get that Oct […]
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 […]
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 […]
-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( […]
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": { […]