Tag: c#
-
Ignoring method in my object with HotChocolate GraphQL
0 I have a class that I expose with Hotchocolate and GraphQL. In this class I have some properties and a public method with the following signature : public Expression<Func<Parcelle, bool>> ToLambdaExpression() By default, Hot Chocolate picks up the public method and exposes them as fields in the graphql schema. I managed to ignore them…
-
GraphQL.Client not returning results, but server completes the request
0 I am unable to retrieve the results of the GraphQL query response returned. The server logs that the request was finished with no error. But the program continues to wait for a response. In the code provided, the Debug.Print statement following the await graphQLHttpClient.SendQueryAsync is never reached. It just indefinitely hangs at this statement…
-
Which version of the C Standard Library does the C++23 Standard incorporate?
7 (My original question was going to be about "What happened to _BitInt?" but that was based on a misreading of some cppreference pages). The Library Introduction section 16.2 of the C++23 Draft Standard says that the C Standard library is supported in C++. The only reference to a specific C standard, however, is in…
-
GraphQL (SendQueryAsync) deadlocked when executing from Maui ViewModel initializer
0 GraphQL query runs just fine when I run it in a C# console app. Using the exact same GraphQL Client, similar code and properties it hangs when I try to run it from a ViewModel initializer in Maui. An exception is thrown: "System.Reflection.TargetInvocationException: ‘Exception has been thrown by the target of an invocation.’" If…
-
Why does GCC copy object for each comparison in `std::ranges::max`?
10 Consider the following example (Godbolt): #include <vector> #include <iostream> #include <ranges> #include <algorithm> struct A { A() {} A( const A& ) { std::cout << "Copyn"; } A( A&& ) noexcept { std::cout << "Moven"; } A& operator=(const A&) { std::cout << "Copy assignedn"; return *this; } A& operator=( A&& ) noexcept { std::cout…
-
GraphQLParser nesting limitation
0 I’m using Facebook’s C++ library GraphQLParser to parse GraphQL queries. If a pass the library a query with an extremely large number of nested selection sets – it crashes due to stack overflow. Query for example: query X { name { name { name { … } Is there a way to configure the…
-
Can one forward declare a function taking a vector of incomplete type with a default value?
6 Below code snippet demonstrates some real issue I faced recently in my program: #include<vector> class A; void f( const std::vector<A> & = {} ); There is an incomplete class A, and a function declaration taking a vector of A‘s with empty default value. And the function is not even called anywhere. It works fine…
-
GCC removes a bounds check in the right operand of &&, but not in the left operand, why?
18 I have the following C/C++ code snippet: #define ARRAY_LENGTH 666 int g_sum = 0; extern int *g_ptrArray[ ARRAY_LENGTH ]; void test() { unsigned int idx = 0; // either enable or disable the check "idx < ARRAY_LENGTH" in the while loop while( g_ptrArray[ idx ] != nullptr /* && idx < ARRAY_LENGTH */ )…