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 […]
3 Either via using GraphQL or the Rest API, I create a cart for a customer (Either by sending customer_id in REST, or x-bc-customer-id in GraphQL). GraphQL: Create customer Impersonation Token and Create Cart Note: There’s also an Assign Cart to Customer mutation, but it only took a cart and didn’t do anything. REST: Create […]
22 I’m trying to combine multiple GraphQL queries into one query using JavaScript. I am looking for something like this: let query3 = mergeQueries(query1, query2); We won’t know beforehand which queries will be combined. Suppose I have queries like this: input query1: { post(id: 1234) { title description } } input query2: { post(id: 1234) […]
0 I am trying to get a test file (ian wheeler ms.png) from a SharePoint online document library in the sub folder General to download to a local folder of C:Temp using this question and answer microsoft-graph-download-file-via-rest-api I am able to make a call in postman to return my file contents to postman. The call […]
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 […]