Tag: hotchocolate
-
GraphQL Federation where two services share data of a single shared schema
0 Really like the GraphQL Federation concept, where a gateway joins the data for clients. For example, imagine a library: Service A serves books from the library with title & ISBN property. Service B serves people, with a checkedOut list of books they have checked out, by ISBN. From what I can tell, though, there is…
-
ASP.NET Core and GraphQl problem with JWT Authentication
0 I am building an ASP.NET Core Web API with GraphQl, but I am facing issues with JWT token authentication. When the user is logged in I am returning the token, but when I want to create a query or mutation with token provided I see message The current user is not authorized to access…
-
Properties with type “object” are ignored in the input types in Hotchocolate GraphQL. Is there a workaround to it?
0 I have an input class that has a single property with "object" object type as shown below: public class FilterParameterValue { public object Value = new object(); } When I start the server, I get the following error: HotChocolate.SchemaException: ‘For more details look at the Errors property. InputObject FilterParameterValueInput has no fields declared. (HotChocolate.Types.InputObjectType<Data.Filter.FilterParameterValue>)…
-
How can you switch includes on and off in Hotchocolate for EFCore
0 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 different tables and related Person -> Payment in a one to…
-
How to implement caching for pagination HOT chocolate?
2 so I want to implement caching. I’m using version 11 hc. Now every time pagination happens there’s requests sent to the database. I want to implement it so the first time a request is made, all the data is retrieved and cached and subsequent requests(going to the next page or previous page) are retrieved…
-
Problem accessing directives inside TypeInterceptor using HotChocolate v14
0 I am trying to access the directives of each field’s type of intercepted types using HotChocolate v14. Why am I getting TypeInitializationException when trying to access ObjectType’s Directives in my TypeInterceptor.OnAfterCompleteName? I also tried OnAfterCompleteType but the same happens. internal sealed class ZajilTypeInterceptor : TypeInterceptor { public override void OnAfterCompleteName(ITypeCompletionContext cc, DefinitionBase td) {…
-
Why HotChocolate does not use the input typename instead of described type name?
0 I have the following mutation in my schema which uses DocumentGraphQlInput as input type. But when I take a look at the schema in StrawberryShake I see that the type name is used (with Input suffix) which is described as DocumentGraphQlInput. What I describe below is the right behaviour and my expectations a wrong,…
-
How to get access to class IList members through GraphQL?
0 I have a simple Graphql query like this public class Query { public async Task<IPagedList<Book>> Books(int pageIndex, int pageSize) { var data = new List<Book>() { new() { Title = "C# in depth.", Author = new Author { Name = "Jon Skeet" } },new() { Title = "How to cook Phở", Author = new…
-
Can you create an embedded Graphql query?
0 I’m attempting to replicate an embedded self-referencing SQL query using GraphQl. The situation is that we have records in a database that are created off of other records by an internal user. The query I am trying to do is to get all of the records of a user and the associated records that…
-
How to create an embedded Graphql query
0 I’m attempting to replicate an embedded self-referencing SQL query using GraphQl. The situation is that we have records in a database that are created off of other records by an internal user. The query I am trying to do is to get all of the records of a user and the associated records that…