29 I’m trying to do this (see title), but it’s a bit complicated since the string I’m trying to build has to have the following properties: mulitiline contains curly braces I want to inject variables into it Using a normal ””” multiline string makes injecting variables difficult. Using multiple f-strings makes injecting variables easy, but […]
0 I tried to use the environment variable in the codegen.yml. I decided to generate the codegen.yml file by using the handlebars. yarn add handlebars codegen-template.yml overwrite: true generates: ./src/generated/graphql.tsx: schema: "{{REACT_APP_GRAPHQL_ENDPOINT}}" documents: src/**/*.graphql plugins: – typescript – typescript-operations – typescript-react-apollo package.json "scripts": { "generate-yaml": "npx handlebars -c .env -i codegen-template.yml -o codegen.yml" } and […]
1 I have a graphQL api I am trying to query . I added a server side function : public class Subscription1 { [SubscribeAndResolve] [Topic] [UseDbContext(typeof(ApplicationDbContext))] public IQueryable<Alert> OnAlertAdded([Service] ApplicationDbContext context, int clientId) { return context.AlertClients .Where(ac => ac.ClientId == clientId) .Select(ac => ac.Alert) .AsQueryable(); } } and I am using postman to get the […]
0 I’m reaching out to inquire about Sentry’s capabilities in detecting specific performance issues. My technology stack includes React for the front end, GraphQL for the API layer, Node.js for server-side logic, and PostgreSQL as the database management system. Here are the specific areas we are looking for assistance with: Frontend Issues in Real Time […]
8 I have a friend function template operator<< that works with both gcc and clang but not with msvc. #include <iostream> #include <type_traits> template< typename T, std::enable_if_t< T{1}, int> =0 > class Foo { template< typename Ar, typename R> friend Ar& operator<<(Ar& os, const Foo<R>& foo) { return os; } }; int main() { Foo<int> […]
0 I have a posts resolver which uses this logic to return posts: const qb = Post.createQueryBuilder(‘post’) .select([‘post.id AS id’, ‘post.createdAt AS id’]) .addSelect( "json_build_object(‘id’, user.id, ‘username’, user.username, ’email’, user.email, ‘createdAt’, user.createdAt, ‘updatedAt’, user.updatedAt)", ‘creator’ ) if (req.session.userId) qb.addSelect((qb) => { return qb .subQuery() .select(‘updoot.value’) .from(Updoot, ‘updoot’) .where(‘"userId" = :userId AND "postId" = post.id’, { […]
2 I’m trying to grab the related posts except the current post using WPGraphQL. My thought is to exclude the ID of the current post and display all related blog posts within the category. I’m new to GraphQL, I don’t know how to figure out to solve it. is this possible in GraphQL? Please help […]
1 Has anyone done a query for Articles that have metafields? I can query the articles with its title, otherfields etc, but by default Shopify won’t return the articles metafields in this call. These metafields for these articles have been created by an app. My first goal would be trying to call all articles and […]
0 Hello StackOverflow Community, I am currently experiencing an issue with a Django project using GraphQL, specifically when attempting to access the GraphQL endpoint through the Krakend API Gateway. Environment: Django: 4.2.6 GraphQL Krakend API Gateway Dockerized environment Problem: When I send a request directly to the Django backend’s /graphql endpoint, it works as expected. […]