Questions tagged [graphql.net]

Github repository and other source can be found at ... https://graphql-dotnet.github.io/docs/getting-started/introduction

Official documentation for the project can be found at ... https://github.com/graphql-dotnet/graphql-dotnet

31 questions
1
vote
0 answers

What are best practices for graphql mutations? (.NET implementation)

I am currently learning graphql and I am not sure if I correctly understand how mutations are supposed to work, especially when combined with subscriptions. I have a page with client details, that include a description and a list of software…
kanpeki
  • 435
  • 2
  • 6
  • 20
1
vote
1 answer

How do I pass a collection to a GraphQL mutation with GraphQL.Net and c#?

I'm trying to build a mutation that accepts a collection. The GraphQL server is written in c# .net core and uses GraphQL.Net. This is my input type; public class PupilReportInputType : InputObjectGraphType { public…
mark_h
  • 5,233
  • 4
  • 36
  • 52
0
votes
1 answer

GraphQl .NET DateGraphType CLR Type Mapping Issue

After upgrading my GraphQL.NET version from v4-v7 I'm running into an issue I can't seem to solve. The solution is also running on .NET 7 which I also recently upgraded. I've tried to search for a resolution to these errors in the migration guides…
Richard Cawthon
  • 421
  • 5
  • 20
0
votes
0 answers

How to create return objects when schema (objectGraphType, QueryType, etc) generated during runtime

In multi tenants environment where each tenant can evolve into different database schema design after lauhching the services, graphGL solution seems not straightforward. What I was able to complete, is using single schema 'Root' as ISchema within a…
swcraft
  • 2,014
  • 3
  • 22
  • 43
0
votes
0 answers

Why doesn't GraphQL.NET honour the errors.extensions schema?

I recently rewrote some GraphQL services from Java to .NET Core. In Java, I was able to provide custom error messages to the clients using the errors.extensions in the response, ie: { "data": { "someMutation": null }, "errors": [{ …
0
votes
1 answer

Getting AutoRegisteringInputObjectGraphType and AutoRegisteringObjectGraphType working for GraphQL.NET v5

I'm trying to get the auto registering functionality working in GraphQL.NET. However getting some issues with List types. Please note that I'm very new to the world of GraphQL and have never used this framework before, if you see any improvements to…
0
votes
0 answers

GraphQL.net injecting service into a graph type object

I'm trying to utilize dependency injection in GraphQL.net to resolve fields on a graph type, but I keep getting the following error: System.Exception: Failed to call Activator.CreateInstance. Type: graphql_di.Models.MyObjectGraphType --->…
bomortensen
  • 3,346
  • 10
  • 53
  • 74
0
votes
1 answer

How to map C# dictionary list type to GraphQL.NET type?

I am using .NET backend and GraphQL.NET. I have user model which has a List dictionary (AdditionalDataList) as follows: public class UserResult { public int Id { get; set; } public string Firstname { get; set; } public…
Abhijit Mondal Abhi
  • 1,364
  • 4
  • 15
  • 34
0
votes
1 answer

Setting up GraphQL.net

Cannot get this to run. I get the following error message, I have made it as simple as possible but what required service am I missing. I am using the Graph Type first…
user1730289
  • 273
  • 4
  • 15
0
votes
1 answer

Subscriptions in GraphQL .NET Core doesn't send response to client

I'm building a GraphQL API in Asp Net Core 3.1. I'm trying to add a subscription that send a new entity to subscriber when it is added. When I execute the subscription from the /ui/playground the handshake with server seems to be successed: GraphQL…
Lorenzo
  • 121
  • 2
  • 5
0
votes
1 answer

Why does GraphQL .Net HttpConext not have the correct user session?

I am using GraphQL .net to respond to graphql queries on the backend of an Asp.net Core website. All the cookies seem to be passed with the requests but for some reason my graphql.net requests do not have the proper user session set on the…
Mark Rogers
  • 96,497
  • 18
  • 85
  • 138
0
votes
2 answers

How to effectively map all the properties of DTO class to the FiledType class using GraphQL.NET?

I am using GraphQL.NET with asp.net core 3.1 to develop graphql based apis. I have the following code: ContactDTO.cs public class ContactDTO { public int ContactId { get; set; } public int? ImageId { get; set; } …
santosh kumar patro
  • 7,231
  • 22
  • 71
  • 143
0
votes
1 answer

graphql .NET endpoint name

We are using graphql .net (Apollo Server) Is the a way to change the URL endpoint? So from http://localhost:xxx/graphql I want it to be http://localhost:xxx/newEndpoint
Benny Afriat
  • 393
  • 1
  • 3
  • 12
0
votes
1 answer

Dependency injection won't work when GraphQL ObjectGraphTypes in multiple assemblies

I have defined several GraphQL ObjectGraphType and queries in several projects. All of these projects has dependency to asp.net boilerplate GraphQL project. It return error "Castle.MicroKernel.ComponentNotFoundException: "No component for supporting…
kenn3th
  • 1,187
  • 2
  • 22
  • 47
0
votes
1 answer

Cannot resolve 'GraphQL.Resolvers.ICountriesResolver' from root provider because it requires scoped service 'Query.Persistence.SampleDbContext'

I am working on API development project using ASP.NET Core 2.2, GraphQL.NET , CosmosDB, EntityFrameworkCore (Microsoft.EntityFrameworkCore.Cosmos(2.2.4). On running the solution, I see an error : Cannot resolve…