Hot Chocolate is an open-source .NET GraphQL server platform developed by ChilliCream. Use this tag for questions about code written using Hot Chocolate or for queries concerning the official documentation.
Questions tagged [hotchocolate]
393 questions
0
votes
1 answer
GraphQL query the implementation class properties but in schema i mentioned only interface how?
I have declared a model class like the below.
public class FunctionalOrganization : IOrganization
{
public Guid Id { get; set; }
public string LegalName { get; set; }
public string Name { get; set; }
public IAddress LegalAddress {…

AnilkumarReddy
- 135
- 1
- 13
0
votes
1 answer
HotChocolate passing different class for Interface for different query in DI
I was wondering if it is possible to pass a different class based on the query you're currently on in DI in HotChocolate.
So saying I have an interface like :
public interface IPrinter
{
public string Print();
}
and…

Makus
- 99
- 1
- 8
0
votes
1 answer
Type-inheritance in HotChocolate GraphQL
HotChocolate queries seem to always return the base class when I try to return something which inherits from a registered type. Example:
Models:
public interface ICar { int Wheels { get; } }
public class Car : ICar { public int Wheels => 4;…

Toodleey
- 913
- 1
- 8
- 22
0
votes
1 answer
How do I configure Hot Chocolate GraphQL enum to return the Enum description
Can HotChocolate GraphQL be configured to convert all enums to their description attribute?

Shaun Whyte
- 66
- 4
0
votes
1 answer
How to Authenticate/Authorize HotChocolate Graph API with FusionAuth API Key
I am currently creating a Graph API in .net core with HotChocolate framework. I was able to implement custom JWT Bearer auth. However, our project requires FusionAuth to be used as auth provider and I am having trouble integrating it with the…

Mahesh Nepal
- 1,385
- 11
- 16
0
votes
1 answer
How to do change query in hot chocolate based on filter applied?
I am new to hot chocolate and I have a filtering use case which I am unable to figure out.
I have this function in my product repository returning product data.
public IQueryable GetProducts()
{
return _context.Products.Where(e=>e.indx…

Nikita
- 19
- 1
- 6
0
votes
1 answer
HotChocolate returning null for DateTime?; Works fine for DateTime
I am using .net 5 and HotChocolate. I have a call that is not returning any values for any fields that have a type of DateTime?, however works fine for DateTime. All fields have the same property type in SQL. This same call used to work, so not sure…

Briana Finney
- 1,171
- 5
- 12
- 22
0
votes
1 answer
Can't find description of methods in HotChocolate.AspNetCore
I installed HotChocolate.AspNetCore package (v. 11.0.9) for my project via NuGet in Visual Studio. While writing methods names or hovering on them I can't see what these methods actually do. I went to some classes to check if there were any summary…

Chameleon
- 23
- 3
0
votes
2 answers
Query organization with HotChocolate
I'm trying to organize my query in such way
public class RootQueryType : ObjectType
{
protected override void Configure(IObjectTypeDescriptor descriptor)
{
descriptor.Include().Name("userQuery");
…

Kolia Ukrainec
- 85
- 1
- 4
0
votes
1 answer
Hotchocolate GraphQL: Dependency not working as intended
I have a small question. In version 10 of Hotchocolate I had the following query:
query getUser($id: String) {
user(id: $id) {
id
email
userClaims {
type
value
}
}
}
Which basically would search for the claims…

Wilson Silva
- 1,324
- 1
- 14
- 25
0
votes
1 answer
.net 5.0 hotchocolate graphql server version 11 where is schema stiching?
Trying to follow along Hotchocolate ChilliCream blog
Basic GraphQl server runs OK. However, when I add schema stiching as instructed in the blog, couldn't build the project. My package references as below;
…

killjoy
- 864
- 17
- 31
0
votes
1 answer
Using Projections does not load field resolved with dataloader
I have my code setup as below (.AddProjection() is already added in Startup.cs file )
[UseApplicationDbContext]
[UsePaging(MaxPageSize = 1000)]
[UseProjection]
[UseFiltering]
[UseSorting]
public async Task> GetOrders(
…

adesh
- 11
- 2
- 9
0
votes
1 answer
splitting query type in hot chocolate qraphql in asp.net core
This is my config in startup .cs
.AddGraphQLServer()
.AddQueryType()
.AddType()
.AddType()
.AddType()
…

Arash
- 3,458
- 7
- 32
- 50
0
votes
2 answers
Adding Authentication Error Handling for expired Token
I am using graphQl Hot Chocolate V11 with .net Core 3.1
I have no problem with the identifying of token expire its just the relaying of that problem back to the requester is the problem.
i am trying to add some Authentication to my Requests but i am…

Aurelius
- 178
- 1
- 1
- 14
0
votes
2 answers
Hot Chocolate "RESULT_TYPE_NOT_SUPPORTED" on subscription
edit 00: NOTE:
This message is coming from the GraphiQL interface. When I tried the same query in the 'Banana Cake Pop' UI, no message is returned when I execute this query.
While trying to create a GraphQL subscription on an ASP.NET web server,…

aptlyundecided
- 21
- 7