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
0 answers
ApolloProvider with Hot Chocolate API returns 404 for Apollo Client
First time using Hot Chocolate and Apollo and I have an issue where the Apollo client created always returns 404 for the Hot Chocolate API. This API is running on localhost and can be queried fine.
Whats weird is, if I use the Apollo Client…

Kurtis
- 1,172
- 2
- 12
- 20
0
votes
1 answer
Hot Chocolate + Mongo: No additional call when I ask only for referene id
Let's assume that I have the following documents in mongo:
Product:
...
productTemplateId
...
Product Template:
id
...
I mapped product to the following schema:
product {
...
productTemplate {
id,
...
}
...
}
I would like to avoid to…

Radek
- 37
- 5
0
votes
0 answers
Hot Chocolate + MongoDB: Getting data from many collection in single task
My Product entity consists of:
templateId
parameterIds
categoryIds
I am getting 100 products in one batch.
I've created data loaders and resolvers for each of references. Now I get template, parameters and categories in three single calls (get…

Radek
- 37
- 5
0
votes
1 answer
how to inject custom dependencies into classes that extend ObjectType, ObjectTypeExtension, InputObjectType or InputObjectTypeExctension?
so I am trying to inject dependencies into classes that extend these types and I am getting runtime errors when I request a schema refresh saying that it cannot create my object. Heres what I am trying to do:
public class SomeResultType :…

victor
- 802
- 7
- 12
0
votes
2 answers
Could not resolve Char Type in Graphql HotChocolate
If I try to expose a class using graphQl I'm getting below error. I know this error is due to char type that I'm using, but I cannot change the structure.
HotChocolate.SchemaException: For more details look at the Errors` property.
Unable to infer…

Gowtham Raj
- 103
- 8
0
votes
2 answers
Using projections without returning IQueryable, GraphQL HotChocolate
Is there a way to use projections if I don't want my services to return IQueryable?
I am thinking of something like, my resolver could map input to an Expression and then call the service class, then query is built and executed based on the provided…

Temp034
- 141
- 11
0
votes
1 answer
How can you switch includes on and off in Hotchocolate for EFCore
So I'm trying to figure out how to tell EfCore when to apply an include to an IQueryable object based on whether the GraphQl request from the client actually includes the related object.
Example:
2 Classes: Person, Payment
Theses are kept in 2…

ZackR
- 61
- 1
- 7
0
votes
0 answers
UseHeaderPropagation not recognized during debug run
I'm working on adding propagation to HotChocolate GraphQL server but simply can't get it working.
I've configured my propagation in my ConfigureServices services.AddHeaderPropagation(o => o.Headers.Add("Authorization"));
I've added it to my…

TroelsJensen
- 1
- 1
0
votes
1 answer
HotChocolate mutation input type uses int instead of ID
I am new to HotChocolate and GraphQL as a whole and am trying to grasp on enabling Nodes and/or Relay support for my GraphQL API. Currently using HotChocolate v12.
Context
I am trying to create a mutation that updates an entity (Client in this…

jerbersoft
- 4,344
- 9
- 42
- 48
0
votes
1 answer
HotChocolate quickstart example not working: no query showing up in Bana Cake Pop
I'm following the "getting started" example of HotChocolate located at https://chillicream.com/docs/hotchocolate/get-started.
When I access localhost:5207/graphql, I'm not seeing any queries under "Documents".
Here's what I tried without…

Krumelur
- 32,180
- 27
- 124
- 263
0
votes
1 answer
Azure Application Insights integration with GraphQL API - HotChocolate Framework
Is there any way to integrate Azure App Insights with Hotchoclate graphql framework? Currently, there are multiple ways of hacking this together.
What is the best way to get everything into app insights broken down by query in app insights just like…

Ricky Gummadi
- 4,559
- 2
- 41
- 67
0
votes
1 answer
Hot Chocolate: Transforming results from [UseFiltering] Query
I'm looking to use Hot Chocolate's Filtering to query against one data type; and then transform that filtered output to another type before returning it as an IQueryable. But I can't seem to find anyway to capture the filter input to start my…

azucarrogers
- 125
- 9
0
votes
1 answer
Interfaces in GraphQL HotChoclate - schema first getting exception
I am trying to implement schema-first in Hot Chocolate and running into SchemaException
I have the below GraphQL Schema
type Query {
sites(skip: Int, take: Int): SitesResponse
}
interface PagedResponse {
hasNextPage: Boolean!
…

Ricky Gummadi
- 4,559
- 2
- 41
- 67
0
votes
1 answer
Hot Chocolate Schema no Loading
I'm trying to implement a GraphQL API that in .NET using Hot Chocolate 12.3.2. I'm able to get the project to build and run. When attempting to test my query CakePop the browser loads fine but there is no schema present.
startup.cs
namespace…

Antarr Byrd
- 24,863
- 33
- 100
- 188
0
votes
2 answers
Does HotChocolate GraphQL server lead to tight coupling between the API and the database?
I'm trying to wrap my head around GraphQL in general and a HotChocolate demo I just watched. Here's what I see as benefits:
Client can request any combination of fields thus offering maximum flexibility
Queries are directly translated into SQL…

Krumelur
- 32,180
- 27
- 124
- 263