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

Host HotChocolate server and Strawberry Shake client in a single process

I am developing a Blazor application initially as a Blazor Server app but the longer term goal is to deploy the same application in a web assembly + server configuration. My preference would be to adopt GraphQL from the 1st day of coding while the…
camelCase
  • 1,549
  • 2
  • 16
  • 28
0
votes
1 answer

How to split resolvers for Query type in Hot Chocolate

I am trying to achieve a standard GraphQL implementation, using the Hot Chocolate library for .net core, where the resolvers for reading data belong to the root Query object. Like this: { Query { GetTodo { Id } } } This is what I…
Mino
  • 635
  • 10
  • 28
0
votes
1 answer

UseSelection is causing an extra sql statement to fire

I have hotchoc all connected up to EF and a sqlserver db. Here is my query... query { accounts { holdings { holdingId } } } If I don't have [UseSelection] on my accounts method, the sql statement pulls all the fields on the…
FeeFiFoFum
  • 1,719
  • 1
  • 11
  • 18
0
votes
1 answer

Can input type object contains a property of interface type?

I've only started learning GraphQL on .net platform. If input type object can contains property of interface type then how to configure it in HotChocolate library? An example of model: public interface ILocationFilter { double Lat { get; set;} …
0
votes
1 answer

GraphQL mutation with subquery for parameter - update/convert DB on write?

Is it possible to add a look up to a mutation in GraphQL? Let's say something like an input type where one property is the result of another query. createPerson(name: "Steve", gender: genders ( name: { eq: "mail" } ) { id } ) where genders ( name:…
Sascha
  • 10,231
  • 4
  • 41
  • 65
0
votes
0 answers

GraphQL Requiring Multiple Variables Not Working Properly with Angular-Apollo

I'll start off by saying, I have been struggling for longer than my pride wants to admit and have put off asking, because I'm not sure how clear I will be; but, here goes . . . I am using Angular 9 with Apollo-Angular and have no trouble accessing…
Briana Finney
  • 1,171
  • 5
  • 12
  • 22
0
votes
1 answer

HotChocolate GraphQL Configure not being called

I have a Query: public class Query : ObjectType { protected override void Configure(IObjectTypeDescriptor descriptor) { Console.WriteLine("Hit Configure"); } public IQueryable
Ian Kirkpatrick
  • 1,861
  • 14
  • 33
0
votes
1 answer

How to access HotChocolate (GraphQL) requested query using IoC

I am trying to improve the sql query performance with hotchocolate. For that, I wanted to access the queryrequest generated by hotchololate in another layer of my app. The only way I could find to do this was to intercept the request, store the…
Lucas Phillip
  • 185
  • 4
  • 15
0
votes
1 answer

Graphql query: how to create a query that returns different fields between items

My query is find a company in the database, returns some basic information, and the financials information over the years. The result looks like: { "data": { "company": { "id": 1, "name": "test company", "companyType": "NH", …
Minh Giang
  • 631
  • 9
  • 28
0
votes
1 answer

I created a new object type but i get an error "has no resolver "

I am testing HotChocolate using the starwars example . I added Enityframework and sql nuggets and hooked everything up with a table named "Merchants". Until now everything works fine and I can query My merchants table using Graphiql . My problem is…
user2596181
  • 103
  • 2
  • 8
0
votes
1 answer

How to resovle exeption HotChocolate.SchemaException: 'Unable to create instance of type ``.' GraphQl-Hotchocolate

I am new to Hotchocolate GraphQL framework and trying to create small solution just to see and understand how it works and what are the capabilities of the framework. I don't quite understand how to use this framework with EF core DbContext and how…
0
votes
1 answer

How to avoid exception on using filtering types for nullable properties

Using Hotchocolate when you try to use filtering via custom filtering type and add to filtering property with nullable type it throwsa an exception on schema generation phase (EffectiveDate is DateTime?): descriptor .BindFieldsExplicitly() …
Dzianis Yafimau
  • 2,034
  • 1
  • 27
  • 38
0
votes
1 answer

HotChocolate Batching error: "The specified directive `export` is not supported by the current schema."

Following the documentation on Batching with @export this tag is not allowed for my server. How can I add the directive so batching is possible?
Bryan Stump
  • 1,419
  • 2
  • 17
  • 26
0
votes
1 answer

Graphiql playground in a .Net Framework Web API

How do we implement a Graphql Playground in ASP.NET Framework Web Application? I was able to query using Postman's new GraphQL POST and it is working as expected. But I was not able to host the graphiql playground using HotChocolate's AspNet Classic…
Pragyan93
  • 701
  • 2
  • 9
  • 18
-1
votes
0 answers

graph ql code auto generation .net core hot chocolate

I am writing an API to fetch data from sql db(about 120+ tables). I have generated model class files automatically. Is there any automatic way to generate Service and Query class files? Right now I am writing these IService and class files. enter…
1 2 3
26
27