Questions tagged [hotchocolate]

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.

393 questions
20
votes
2 answers

How can I get more error details or logging, when an exception is thrown in a HotChocolate GraphQL server?

I’m building out a simple HotChocolate GraphQl server and HotChocolate throws an Unexpected Execution Error, but doesn't expose any information about the error, as soon as I post a request against it. It doesn't matter how I post the request against…
FredericBirke
  • 1,002
  • 1
  • 7
  • 13
14
votes
4 answers

Clean Architecture CQRS with GraphQL API

I'm working on an API server (ASP.NET Core). To prevent spaghetti code and other nastiness in the future, I design the system following Clean Architecture/CQRS (using MediatR). I'm considering to use GraphQL for the API instead of REST (Hot…
Arthur Kater
  • 826
  • 10
  • 17
12
votes
1 answer

How to expose a property at different level of schema in Hot Chocolate

I am working on converting a shodily designed REST API into a smooth GraphQL API with Entity Framework Core and Hot Chocolate. I am currently exposing my entire database via UseProjection. My database contains a table Foo with a foreign key to table…
Braden Cok
  • 151
  • 1
  • 7
10
votes
1 answer

How can I extend the GraphQL introspection types with Hot Chocolate in .NET

In my case I want to extend the __EnumValue introspection type to essentially carry additional information about the enum value. How can I add additional fields to the introspection.
10
votes
3 answers

How can I print the schema in HotChocolate as GraphQL SDL

It would be great for development with Relay to print the GraphQL SDL directly with the Hot Chocolate GraphQL server. Is there a way to do this? schema { query: Query } type Query { sayHello: String }
10
votes
2 answers

Hotchocolate validation with C#

So I've been playing around with Hotchocolate lately and I made a class which gives me back a list of students, but I want to have some validation functions for it. I didn't really find anything that helps me from the official hotchocolate…
Makus
  • 99
  • 1
  • 8
9
votes
1 answer

There was no argument with the name `...` found on the field `...`

I'm using HotChocolate 12.0.1. I have following type definition: public class MyType : ObjectType { protected override void Configure(IObjectTypeDescriptor descriptor) { descriptor.Field(p => p.Name) …
Pavel
  • 653
  • 2
  • 11
  • 31
9
votes
2 answers

How to customize SQL query according to GraphQL request using HotChocolate and Dapper?

I'm using HotChocolate as my GraphQL server and Dapper to access the database in my project. Currently With each graphql query requesting "some" fields of an entity, the whole row is queried from database and this is wasting resources especially…
ahamid555
  • 333
  • 4
  • 16
8
votes
2 answers

graphql - how to filter a nested list

I am currently trying to filter a nested list based on a given id, but don't understand the syntax required. Although I have altered the entities and properties, this is what I am attempting { companies{ company{ id, name, …
user3428422
  • 4,300
  • 12
  • 55
  • 119
8
votes
1 answer

Can't figure out is it possible to use multiple schemas in Hot Chocolate for ASP.NET Core

I'm trying to start developing GraphQL API with Hot Chocolate library on ASP.NET Core but I can't figure out how to use different schemas for different endpoints. I know about schema stitching but it's not what I'm looking for. What I would like to…
8
votes
0 answers

Aggregations On HotChocolate Graphql

I am new to HotChocolate and I am seriously try to add aggregates like sum, average, count and etc. to my graphql backend. So, the frontend could query the aggregations without doing additional efforts on backend. something like hasura…
7
votes
2 answers

Multiple Query Type in Graphql Hotchocolate

I am using hot chocolate graphql. I have a scenario where I have two separate query type classes. PostQuery -> contains post related queries UserQuery -> contains user related queries My Folder Structure Here it is how I am configuring it …
shujaat siddiqui
  • 1,527
  • 1
  • 20
  • 41
7
votes
4 answers

How can I create a GraphQL partial update with HotChocolate and EFCore

I am trying to create an ASP.NET Core 3.1 application using Entity Framework Core and Hot Chocolate. The application needs to support creating, querying, updating and deleting objects through GraphQL. Some fields are required to have…
Alban
  • 163
  • 1
  • 8
7
votes
1 answer

hotchocolate custom filter on parent based on child collection

I'm trying to implement similar to described here filtering model with hotchocolate code-first approach. I need to filter movies if at least one of their actors meets certain criteria. Model looks like this: public class Movie { public…
Sly
  • 15,046
  • 12
  • 60
  • 89
7
votes
1 answer

How do I implement subscriptions in GraphQL HotChocolate?

I am implementing HotChocolate as part of my ASP.NET API. I'm trying to add subscriptions to the chat portion on my app, however, the documentation on the HotChocolate site is not implemented yet. From what I can tell from other sites/frameworks, I…
Tristan Trainer
  • 2,770
  • 2
  • 17
  • 33
1
2 3
26 27