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
0
votes
0 answers

Ingest graphql.operation.name to request data in open telemetry

I'm working on my project's instrument with hot chocolate(GraphQL), and as part of the process, we're exporting the open telemetry to Azure Application Insight. I have a question regarding the request data: { "name":"Request", …
WatersLake
  • 1,252
  • 2
  • 13
  • 21
0
votes
1 answer

Issue with adding Object Type in GraphQL API using HotChocolate library in ASP.NET Core 7

I'm developing a GraphQL API in my ASP.NET Core 7 project using the HotChocolate library. I'm facing an issue while adding a new Object Type to the schema. Specifically, when I add my PlatformType class, the API requests stop processing…
0
votes
0 answers

UnionTypes in HotChocolate

I am trying to copy this GraphQL schema (don't have access to its code): type User { id: ID! email: String! role: UserRole! } type ForbiddenError { message: String! } type Mutation { login(input: LoginInput!): LoginOutput! } union…
motpfofs
  • 103
  • 1
  • 2
  • 4
0
votes
0 answers

Visual Studio freezes at 100% CPU using hotchocolate graphgl autogeneration

Something with hotchoclate library just makes Visual Studio freeze at 100% CPU so that we have to kill VS and reopen. It happens over and over again. After a short moment of coding VS just freezes…
0
votes
0 answers

Can multiple HotChocolate ObjectTypes of the same Type can be registered and used in different queries?

We receive our data from the EF Core Model directly. Currently there is one registered ObjectType with configuration. Is it possible to register a second object type of the same Type with different configuration (properties to ignore, different…
gneric
  • 3,457
  • 1
  • 17
  • 30
0
votes
0 answers

Creating a custom date filter in Hot Chocolate

I've been trying and failing to create a custom filter for Date types using Hot Chocolate. The issue is that the HC defaults to DateTimeOffset, but for filtering dates coming from the application, the time portion doesn't make any sense. I've tried…
Rob M
  • 1,007
  • 2
  • 17
  • 38
0
votes
1 answer

One huge GraphQl query for all page components instead of multiple single queries - what about navigation and already loaded data?

Imagine a main page at url path / with components ComponentA, ComponentB and ComponentMain. So maybe something like this: Instead of ComponentA, ComponentB and ComponentMain each making a single GraphQl query on their own, one could hoist up the…
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
0
votes
0 answers

HotChocolate with Entity Framework uses different column/table name on join with projection

I have a simple very basic API implementation. It returns the data perfectly when using the HotChocolate interface. However, I want to join data and return it as such when the consumer calls to the endpoint. When I execute on a projected model, the…
0
votes
0 answers

How to throw errors in a GraphQL subscription using HotChocolate?

I have an ASP .NET Core GraphQL API using HotChocolate. It is possible to start a long-running operation using a mutation, in this case extracting a file. I am using subscriptions to notify the user when the process is finished. But if an exception…
Meta
  • 1
  • 1
0
votes
0 answers

"Authorization" Header propagation with Hot Chocolate and nswag API Client not working

Very strange issue on a C# project with few important things. Hot Chocolate for GraphQL Header propagation for forwarding the HTTP Headers to API's nswag generated API Clients I followed the whole tutorial here:…
Patrick
  • 829
  • 2
  • 13
  • 34
0
votes
1 answer

Is it possible to use Hot Chocolate execution engine directly, without a web server?

Is it possible to run and call Hot Chocolate execution engine directly, without hosting it as a web server and calling it by HTTP? I imagine something like this: var query = ... ;// a GraphQl query string var engine = new…
JamesL
  • 351
  • 2
  • 10
0
votes
1 answer

Adding a custom auth logic for graphql queries

I have a RESTful API with .NET Core. It has a custom auth logic. I want to create a temporary solution and expose /graphql endpoint for the same service that should have a custom, different, authentication logic with custom policies. Is it possible…
dr11
  • 5,166
  • 11
  • 35
  • 77
0
votes
0 answers

How to dynamically set MaxPageSize in UseOffsetPaging in Hot Chocolate?

I want to dynamically set value to MaxPageSize in UseOffsetPaging rather than global setting. How to do that? Following are ways to set it, either globally OR per query. But what I want is, set it per query as shown in "Desired Result" block below.…
GThree
  • 2,708
  • 7
  • 34
  • 67
0
votes
0 answers

How to paginate with hotchocolate using a resolver. I followed the documentation but it doesn't work. What am I doing wrong?

I found the following code in the documentation of hotchocolate at this link https://chillicream.com/docs/hotchocolate/v13/fetching-data/pagination public class QueryType : ObjectType { protected override void…
0
votes
0 answers

Hot Chocolate stitching a list of GUIDs or GUIDs as strings to function that takes a list as input

We have an "email" entity that has a list of recipient_ids (stored as UUIDs in Cassandra). These ids are associated with an "account" entity. We have separate APIs for each object type(entity) and one that performs the stitching. Using stitching we…
Scott A
  • 1
  • 1
  • 1