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
1 answer

Remove Pagging From Grapql With Client Query

Helllo, How can I remove UsePagging some client request? I am just want return all data some request but my query have UsePagging (UseSortingAttribute). HotChocolate 12 .Net 6
Fehmi Aksakal
  • 31
  • 1
  • 7
0
votes
1 answer

How to organize unified search by multiply types (C#/HotChocolate)

I want to implement a unified search in my app - a single endpoint that returns results of different types by some search token. My current realization is straightforward. HotChocolate query: [ExtendObjectType("Query")] public class…
okolobaxa
  • 338
  • 1
  • 4
  • 16
0
votes
2 answers

How can I get object by specific parameter in GrahpQl with HotChocolate C#

I am using HotChocolate library to work with GraphQL via .NET. I already can get all objects, that are stored in db, using this query: query { news { title description } } But I need to have an opportunity, to select…
0
votes
1 answer

Hotchocolate Graphql with Angular Apollo Code Gen

I'm trying to test out the apollo graphql codegen for angular. as such I created a net 5 server that hosts Grapqhl endpoint at https://localhost:8081/api/graphql/. It loads fine and no worries. I've then created a dummy angular project with apollo…
Aeseir
  • 7,754
  • 10
  • 58
  • 107
0
votes
1 answer

.NET GraphQL Hot Chocolate Projections only working for requested List of Entities but not for requested Single Entities

So if i understood it correctly Projections are used to get rid of the Over/ Under fetching problems you would have with normal REST-APIs. I already implemented a GetAll Functionality for my Author-ObjectType, and there it works pretty fine. My…
Dejavu
  • 27
  • 1
  • 10
0
votes
1 answer

Why does Resolver behave differently in Query vs Mutation?

I've been struggling with the issue/behaviour described below for while now and can't seem to figure out what's going on. This is all based on inherited/adapted code, so it's completely possible that I'm missing something fundamental. It's been…
Peter Bernier
  • 8,038
  • 6
  • 38
  • 53
0
votes
0 answers

Python\GraphQL\HotChocolate Query Issue argument Decimal

The query below works in GraphiQL Playground. When I put it into my Python script and execute the script I get below message: gql.transport.exceptions.TransportQueryError: {'message': 'Variable idCustomer_chk is required.', 'locations': [{'line':…
0
votes
1 answer

Hot Chocolate Graph QL.. Extend An Object With Existing Resolvers c#

Is it possible to pass an existing resolver into an Extension of an object method, so I can reuse the resolver? I am getting "Unexpected Execution Error : "No service for type 'UserPreferenceResolver' has been registered.", when executing a query.,…
Mike Ross
  • 155
  • 1
  • 1
  • 9
0
votes
1 answer

NET 6 WebAPI with Hotchocolate GraphQL not authorizing

I have a NET 6 api that I am using HotChocolate 12.7 in. My queries work, but when I am trying to add the [Authorize] decorator to a query, and send the request with the Bearer token, I am getting the unauthorized response. I can not get it to…
maxsands1503
  • 157
  • 2
  • 15
0
votes
2 answers

How to change hotchocolate default json serializer

How can i change the json serializer used by hotchocalate i could not find anything in the documentation. i tried to look at the source code but it seems like it hard coded in the HttpResponseExtensions . its uses camel case so it will a pain to…
CSharp-n
  • 291
  • 2
  • 15
0
votes
1 answer

Hot Chocolate GraphQL method versioning

How i can implement the Hot Chocolate GraphQL method versioning similar like to REST, i.e. /graphql/v1 or using request header. i don't want to use Deprecating fields because there is no any change in input or out param but i have change in method…
Mudasser
  • 29
  • 2
0
votes
0 answers

HotChocolate UsePaging or UseOffsetPaging slows down the query to more than 30 seconds

I'm new to HotChocolate and graphql but this issue that I have at the moment with HotChocolate is a bit strange. So I'm using the following packages in a dotnet 6.0 webapi project: HotChocolate.AspNetCore @…
Farhad Nowzari
  • 79
  • 2
  • 11
0
votes
0 answers

GraphQLErrorFilter Save Error log in Database

I'm trying to save to the database all the errors that the error filter get. This is what i'm trying. in Startup.cs .AddErrorFilter(provider => { return new…
0
votes
1 answer

Generic Automapper Precondition for Struct type with `Value`and `HasValue`

I'm using Automapper and Hot Chocolate. I am using a struct type on my source class properties named Optional<> which has the methods .Value and .HasValue, this is used to determine whether the client passed in these values or not. This is used for…
oysandvik
  • 36
  • 5
0
votes
2 answers

Graphql hot chocolate merge data from rest endpoints

I am creating a hot chocolate service as a gateway for merging data from multiple rest endpoints. But I am having a hard time finding any resources that explain how to resolve guids to objects from other endpoints. For example one service has a db…