7 I am trying to format a std::chrono::duration object to the format HH:MM::SS, e.g. 16:42:02 being the hours (16), the minutes (42), and the seconds (2). the library fmt offers useful formatting specifiers for this: using namespace std::chrono; auto start = high_resolution_clock::now(); auto end = start + 4s; fmt::print("{:%H:%M:%S} n", end); which unfortuantely prints the […]
0 I am trying to pass the pubsub to resolvers. I am able to pass pubsub to subscription ‘subscribe’ functions via the useServer function, and as far as I can tell from research the expressMiddleware context should be passed to all resolvers, but when logging it out I’m just getting the request object. index.ts const […]
0 Using apollo graphql, I have a mutation that modify the "Person" object in the database All throughout the app, I have various queries to fetch that from "Person". Sometimes I need the whole object, sometimes only the name or the age. There is a list of persons (generated using the PERSON_IDS query) and when […]
0 I am trying to setup dynamic routes in Astro SSR mode. From the api I can use the following query (it contains fragments): I am using Apollo Client. const GET_PAGE = gql` query Page($target: String!) { page(target: $target) { type content { … on PageOne { url: anotherKey title: anotherTitleField id } … on […]
0 I try to create dynamic routes in astro SSR mode. I am using Apollo client. I have this grapql query from the api: const GET_PAGE = gql` query Page($target: String!) { page(target: $target) { type content { … on MyPage { id url } } } } `; So based on the target variable […]
0 In electron.js I have basic component that has two useQuery hooks. When the component re-renders the hooks fire and should result in 2 calls in the network tab. However there are 3 or sometimes 4 requests. Looks like the apollo cache is not working. If remove one hook and fire the other one multiple […]
0 I’m trying to use the result I’m getting from my apollo client. but it keeps giving me error of undefined although the request send was success in network. It means I cannot get access to the result like normal! the code in my store is: async questionSearch({ commit }, data) { const ALL_QUESTION_SEARCH = […]
19 Just like the post ask I need to be able to search with 3 possible scenarios. I need to have all uppercase, or lowercase, or normal casing. If that is not possible is there a way to do a case insensitive filter instead? allMarkdownRemark(filter: { brand: { eq: $normalBrand } }) { //==> Need […]
14 This code compiles and executes fine using GCC 13 and Clang 17, but fails to compile on MSVC. I am wondering if the code is required to work according to the standard or if this is a problem with MSVC. Demo #include <utility> #include <iostream> enum e : int { A=5, B, C, D […]