Tag: Asp.Net Core
-
Can a GraphQLHttpClient be instantiated against an in memory server
0 Hoping to run integration tests against an in memory server. If I were to create the in-memory server using WebApplicationFactory<Program>, how would I instantiate a GraphQLHttpClient against it? The constructors for GraphQLHttpClient expect an endpoint. I know I could run integration tests against an in memory server in dotnet core 7.0 using an HttpClient […]
-
Field true not found on type Site
1 I’m using EntityGraphQL with an asp.netcore app that uses Entity Framework This query works { sites(filter: "id==1") { id name isActive } } But this one fails with: "Field true not found on type Site" { sites(filter: "isActive==true") { id name isActive } } The documentation says I should be able to do that, […]
-
GraphQL Server – Addscoped (without explicitly specifying)
0 I am writing a graphql api using .net core+hot chocolate. I have to define all service names while creating graphql server. I have more than 20 service classes. Is there a generic way of specifying these services, I dont want to write 20 + lines of code to specify each service name. addscoped .net […]
-
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; } // […]
-
GraphQL Server – Addscoped (without explicityly specifying)
0 I am writing a graphql api using .net core+hot chocolate. I have to define all service names while creating graphql server. I have more than 20 service classes. Is there a generic way of specifying these services, I dont want to write 20 + lines of code to specify each service name. addscoped .net […]
-
graph ql code auto generation .net core hot chocolate
0 I am writing an API to fetch data from sql db(about 120+ tables). I have generated model class files automatically. Is there any automatic way to generate Service and Query class files? Right now I am writing these IService and class files. enter image description here enter image description here .net api asp.net-core graphql […]
-
How I can pass GraphQL header in ASP.NET Core 6?
0 I use ASP.NET Core to consume GraphQL API and everything working fine, just I need pass the header because I need to use Arabica language and I don’t know how I can pass it. So I need to change language to "ar" when header is passing. [HttpPost] public async Task<IActionResult> Tracking(string code) { var […]