Questions tagged [graphql-dotnet]

Use for the GraphQL .NET project.

Tag for the GraphQL .NET project.

https://github.com/graphql-dotnet/graphql-dotnet

105 questions
2
votes
1 answer

How to pass parent type values as arguments to child types in GraphQL-Dotnet?

Shows - Parent Type Person - Child Type ONE show can have MANY persons. I want to pass each 'personId' from shows type as an argument to its child type Person as shown below: { shows { showId personId person(personId:…
MAK
  • 1,915
  • 4
  • 20
  • 44
2
votes
2 answers

how to use pascal casing instead of camel casing in graphql dotnet

here I have a mutation, as you can see the parameter name is Product with capital P and the field name is CreateProduct with capital C when I execute this mutation from graphical I have to write the name of the field on camel casing and also the…
2
votes
1 answer

GraqhQL problem with auth on fields with JWT

So I have graphql as backend and React / Apollo as Frontend. I have already implemented my JWT Token Auth, which works fine. Additional to that I have my Middleware, in which the HttpContext is given and the user is correctly loaded with all…
PassionateDeveloper
  • 14,558
  • 34
  • 107
  • 176
2
votes
0 answers

Implement authorization on Fields using GraphQL.NET and ASP.NET Core 2

I have a existing REST API developed using ASP.NET WEB API 2 where the authorization is handled by storing all the controller name and action method details in a xml file. WebAPIAuthorization.xml:
santosh kumar patro
  • 7,231
  • 22
  • 71
  • 143
2
votes
1 answer

How to extract request headers and pass it to the business logic in case of asp.net core 2 graphql endpoint?

I have the following code snippet developed using asp.net web api 2 and EntityFramework 6. public class TestController : BaseApiController { private readonly ITestService _testService; private readonly ICommonService _commonService; …
santosh kumar patro
  • 7,231
  • 22
  • 71
  • 143
2
votes
1 answer

GraphQL.NET interface using ResolveType

I am new to GraphQL and I'm currently trying to build an api for a existing library. There I have Tags which have an unique alias, a value which can be of different types and some properties. To take care of the different value types, I have defined…
arose
  • 138
  • 1
  • 8
2
votes
1 answer

argument overloads for GraphQL field

I'm trying to implement a GraphQL server using the .Net implementation - Conventions On the server I want my schema to be like this public class StarWarsQuery { public IEnumerable Droids() { return…
OrdinaryOrange
  • 2,420
  • 1
  • 16
  • 25
1
vote
0 answers

Graphql dotnet v7 can not identify UseGraphql

I simply create new dotnet web api core v7 and want to add dotnet graphql v7 too. this is my program.cs using GraphQL; using Erapi.Graphql.Queries; using GraphQL.Types; using Erapi.Graphql.Notes; using GraphQL.MicrosoftDI; //using…
yozawiratama
  • 4,209
  • 12
  • 58
  • 106
1
vote
0 answers

Dependency injection in Hotchocolate GraphQL, ASP.NET Core

Is it possible to do something like this? Query.cs class Query : ObjectType> where T : class { protected override void configure(IObjectTypeDescriptor> descriptor) { descriptor .Field(f =>…
1
vote
1 answer

.NET Core API with GraphQL and dynamic Dictionaries

I have a .NET Core API app that allow users to create models with specific schema (much like common Headless CMS). The models act as Template for contents. The content created on top of models are stored in NoSQL Database and the class that owns the…
Simone Belia
  • 253
  • 3
  • 10
1
vote
1 answer

GraphQL dotnet Client response not deserializing

When deserializing into a dynamic I can get a response but when I try to deserialize into a typed object I get nothing back. Types being serialized public class User { public string Forename { get; set; } } public class…
John_Mason27
  • 227
  • 4
  • 17
1
vote
1 answer

SubscriptionDocumentExecutor in GraphQL DotNet

I am building a new GraphQL API using the GraphQL for .NET and the GraphQL for .NET - Subscription Transport WebSockets packages and I am trying to test some Subscriptions I have set up in my schema. However, I am currently getting this error when…
Mr-DC
  • 799
  • 5
  • 14
  • 25
1
vote
1 answer

Writing mutation graphql-client c#

I tried to write mutation but it gives me error. as {"errors":[{"message":"Syntax Error: Expected $, found Name \"objects\"","locations":[{"line":2,"column":27}],"extensions":{"code":"GRAPHQL_PARSE_FAILED"}}]} The code I wrote is this. …
Namco
  • 43
  • 1
  • 7
1
vote
0 answers

Intermittent error System.ObjectDisposedException: Cannot access a disposed object

To give more context we have a ASP.NET Core abp framework with GraphQL setup. It is all working good but when we deploy this in the environment with load balancer it is failing with error below. Error Object name: 'Scope cache was already…
raelo
  • 11
  • 2
1
vote
1 answer

What is the difference between graphql-dotnet/graphql-dotnet/ and graphql-dotnet/server/

Good morning. I am a bit confused about these two repositories(graphql-dotnet/graphql-dotnet/ and graphql-dotnet/server/). https://github.com/graphql-dotnet/graphql-dotnet/ and https://github.com/graphql-dotnet/server They are both under the same…