Tag: graphql
-
NestJS: How to get User from the request in a GraphQL custom Guard which extends from JWT AuthGuard
4 I use Passport and GraphQL and if I do my own custom guard to get user’s roles it just doesn’t work. I don’t have access to the user from the request in a Guard, is that intentional? I think it should be part of the request (I’m totally new to NestJS), so why I…
-
Strapi v4 too much nested data
5 I’m rewriting strapi v3 queries to v4 (GraphQL), and with new fields ‘data’ and ‘attributes’, I have a problem going too much deep into nested objects, an example of how data looks: user { data { id attributes { company { data { id attributes { location { data { id … } }…
-
Refetch queries server side after a client side mutation apollo client
0 I’m using the experimental version of graphql and apollo client together with next13 and at one point in my code I perform a mutation in a client side component to delete data and I need the query that was performed in a server side component to be re-done for the list of results to…
-
(Gatsby) Displaying frontmatter data in MDX component
0 I’m trying to create a simple Byline component to use in my MDX posts that displays the site author with a href="mailto:[email protected]" and a time tag with the date the post is given in its frontmatter. I’ve tried following this Gatsby tutorial to learn how to query frontmatter through GraphQL in a component. I…
-
GraphQL: Subscriptions vs periodic querying to be up to date without refresh?
2 The bounty expires in 20 hours. Answers to this question are eligible for a +50 reputation bounty. Tony Ngomana is looking for an answer from a reputable source. Imagine that we want to serve a web application to thousands of users. The information on the page should stay up to date even if the…
-
Cannot access to a disposed context instance
0 I’m using dotnet 6 with GraphQL 7. I’m having some issues only in one Field. The error appears only when the app is deployed in the cluster (kubernetes), but never in local. So it seems like the Dependency Injection is not working properly, here is the code of the query: public class UserModulesProgressField :…
-
HotChocolate UseSorting doesn’t work on computed fields
0 I have an ItemType defined with some custom fields that are resolved with ResolveWith: public class ItemType : ObjectType<Item> { protected override void Configure(IObjectTypeDescriptor<FilterTreeItem> descriptor) { descriptor .Field(“fullName”) .Type<StringType>() .ResolveWith<Resolver>(r => r.GetFullName(default!)); // Other properties } private class Resolver { public async Task<string> GetFullName([Parent] Item? parent, CancellationToken cancellationToken = default) { return quot;{parent.FirstName} {parent.LastName}”;…
-
Unable to install express-graphql
9 I’m trying to install express-graphql but getting this error. Please, help! npm install –save express-graphql npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/graphql npm ERR! graphql@"^16.2.0" from the root project npm ERR! npm ERR! Could not…
-
How to login in admin-api Vendure in graphQl
-1 I have got admin-api in my graphQl. GraphQl use Vendure data. Also when i want to write query in admin api, i have error: You are currently not authorized to perform this action" I tried to check Vendure doc about admin-api, but I’m not found information about login in it. Also i have got…
-
Storefront API CheckoutCreate Without Adding Lines Without A VariantId
0 We have a downstream application which manages inventory and products but we’d like to use Shopify Cart and Checkout for the functionality it has, third party apps, discount code, coupons, abandoned cart reporting and security but do not want to manage inventory or store my products on Shopify. I am using the Storefront API…