Tag: Asp.Net
-
How to implement caching for pagination HOT chocolate?
2 so I want to implement caching. I’m using version 11 hc. Now every time pagination happens there’s requests sent to the database. I want to implement it so the first time a request is made, all the data is retrieved and cached and subsequent requests(going to the next page or previous page) are retrieved…
-
In graphQL, the first query always takes longer than the next query for the same query
0 I use GraphQL in my Net core application. I discovered that for the same query, the first query took quite a long time (about 1400ms). But when I query again, the time is only 20ms, the next time too. Why? This is my code [UseDbContext(typeof(StudentManagerContext))] public async Task<List<CourseType>> GetAllCourseUsingDataLoader([ScopedService] StudentManagerContext context) { var stopwatch…
-
An error occurred while executing the command definition. See the inner exception for details.(11)
-1 I added one table inside db and generated model with entity framework in asp.net web api(not core) when i try to access that particular end point I am getting this error fast if someone knows this how to solve post your answer I tried this today and expecting an answer asp.net entity-framework graphql Share…
-
UseOcelot and Hot Chocolate
0 i have gateway with ocelot and Hot Chocolate grapqhl after my initialisation app.UseHttpsRedirection(); app.MapGet("/", () => "Ok"); app.MapGraphQL(); app.UseAuthorization(); app.MapControllers(); app.UseSwaggerForOcelotUI(options => { options.PathToSwaggerGenerator = "/swagger/docs"; options.ReConfigureUpstreamSwaggerJson = AlterUpstream.AlterUpstreamSwaggerJson; options.DefaultModelsExpandDepth(-1); }) .UseOcelot() .Wait(); app.Run(); Graphql UI stop and /graphql stop working Can you help me ? asp.net graphql ocelot Share Improve this question Follow…
-
Hot Chocolate, AWS EC2 docker instance
0 i have deployed asp.net in docker on ec2 instance ECS, with load balancer controller weatherforecast working corectly hotchocolate graphql UI doesnt work on aws, on localhost docker works fine. I test on postman, and works fine, schema fetched. Can you help with aws settings, for graphql working My actual program.cs builder.Services.AddGraphQLServer().AddQueryType<GraphQls>(); builder.Services.AddCors( options =>…
-
GraphQL + BananaCakePop won’t work in a Docker container
0 I’m creating a proof of concept with a GraphQL ASP.NET API and Hot Chocolate / BananaCakePop for web-based querying by local developers. It is just the most basic API at present with a single query point. I have the app running fine locally in VS but am having problems when I try to Dockerize…
-
Invalid cast Microsoft.EntityFrameworkCore.HierarchyId
0 I use GraphQl to fetch the data, here is my method in order to get the result based on category ID. public IQueryable<Product> GetActiveProducts( string categoryId, CancellationToken cancellationToken ) => return _dDbContext.Categories.Where(x => x.Id == categoryId); Also, my entity is as follows: public class Category:IEntityHierarchy { public string Id { get; set; } //…
-
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 :…