0 I’m currently developing a GQL API in Rust using Actix and Juniper. actix = "0.13.0" juniper = "0.15.11" I’ve managed to create a working environment without issues, however I’ve noticed that Juniper is automatically renaming my Query fields. The code below generates a new field under my QueryRoot which should be named "list_shows" impl […]
3 I have a schema defined as follows: enum CardType { TYPE_1 TYPE_2 } type Card { id: ID! } type Order { id: ID! cards: [Card]! } input OrderFilter { cardType: CardType } type Query { getOrders(orderFilter: OrderFilter): [Order] } Also, the following resolvers: @QueryMapping public List<Order> getOrders(@Argument OrderFilter orderFilter) { return this.orderService.get(orderFilter); } […]
1 I’m learning GraphQL by building a simple python application, basically runs nmap scans stores output to a database, and can be queried by a GraphQL API. I seem to be a bit confused on how GraphQL works. I have a few tables that are one-to-many relationships: user has many scans, scans have results, results […]
0 I am currently getting userprofile information from the following endpoint ‘/api/v1/users/web_profile_info/?username=${username}’ which works. However it is quickly rate-limited and not suitable for my application. I would like to use the graphql endpoint for user profile information (biography) so I do not get rate limited. I cannot figure out how to generate a query_hash for […]
19 Does the definition int a = 0, b = a++, c = a++; have defined behavior in C? Or almost equivalently, does the , in an object definition introduce a sequence point as for the comma operator in expressions? Similar questions have been asked for C++: Does `int a = 0, b = a` […]
26 I’m about to convert a lot of old C++ code to more modern C++. There are many raw 2D arrays in that code like: Foo bar[XSIZE][YSIZE]; And I’m about to replace these declarations with std::array<std::array<Foo, YSIZE>, XSIZE> bar; This is a convenient way because the statements stay the same and the code is supposed […]
27 A common source of bugs in C or C++ is code like size_t n = // … for (unsigned int i = 0; i < n; i++) // … which can infinite-loop when the unsigned int overflows. For example, on Linux, unsigned int is 32-bit, while size_t is 64-bit, so if n = 5000000000, […]
18 A common source of bugs in C or C++ is code like size_t n = // … for (unsigned int i = 0; i < n; i++) // … which can infinite-loop when the unsigned int overflows. For example on Linux unsigned int is 32-bit, while size_t is 64-bit, so if n = 5000000000, […]
27 The following C++ code prints 11.1 then crashes. The lambda function seems to be called correctly inside the constructor, but then later, that same function no longer works! Why is this? Does the lambda have a limited lifespan? #include <functional> #include <iostream> class LambdaStore { public: LambdaStore(const std::function<void(float)>& _fn) : fn(_fn) { fn(11.1f); // […]
10 I have a dataframe as the following : COL_1 COL_2 COL_3 COL_4 COL_5 COL_6 <int> <int> <int> <int> <int> <int> 1 1 1 1 1 1 1 2 1 1 1 1 1 2 3 1 1 1 1 1 3 4 1 1 1 1 1 4 5 1 2 1 1 1 […]