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

How to receive a real object in GraphQL dotnet client app?

I run a GraphQL client and send the queries var response3 = await client2.SendQueryAsync(request2); var response2 = await client2.SendQueryAsync(request2); var response1 = await…
ZedZip
  • 5,794
  • 15
  • 66
  • 119
0
votes
1 answer

graphql-dotnet how to call a query from code

Im currently trying to call a field on graphql-query from code, without using the http layer. In a test case I had success using this snippet inside of a field resolver. The breakpoint hits. var newContext = new ResolveFieldContext(context); var…
slxSlashi
  • 267
  • 1
  • 3
  • 11
0
votes
1 answer

Reusing common logic between graphql-dotnet fields

Apologies if this has been asked before, but I wanted to ask about how I can re-use certain logic between fields in a graphql-dotnet type class ? For e.g. public MyClassType() { Name = "MyClassType"; Field( name:…
user1427026
  • 861
  • 2
  • 16
  • 32
0
votes
0 answers

Seconds scalar is always null in vue-apollo

I'm trying to pass an int value as seconds scalar to my graphql-backend. The frontend uses vue-apollo and the backend is written in dotnet core using graphql-dotnet. When I call the mutation via playground, everything works fine. Neither does my vue…
Andreas Sawatzki
  • 127
  • 2
  • 12
0
votes
1 answer

Best pattern to manually parse arguments for query optimisation in GraphQL dotnet

We have a GraphQL dotnet implementation sitting on top of our existing app database.
Mark McGookin
  • 932
  • 1
  • 16
  • 39
0
votes
1 answer

GraphQL .Net Subscriptions EventStreamFieldType not Subscribing to IObserverable

I'm trying to set up subscriptions on my GraphQL server using GraphQL .Net. I have followed the documentation in the QraphQL.Net docs and the PluralSight course by Roland Guijt and looked online for more information. What I have looks like it should…
Jeff Finn
  • 1,975
  • 6
  • 23
  • 52
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
1 answer

Can I make connections NonNullable in GraphQL .NET?

I'm working on a project, where we need to make non optional connections, and I can't really find anything on the subject. I made the fields work with the NonNullableGraphType as shown beneath, but I have no luck getting the connections to be non…
oliverkea
  • 13
  • 2
0
votes
1 answer

How do I access the argument values in GraphQL fields when using GraphQL.Net with c#?

Consider the following query; query { droid(id: "123") { id name } } I can access the id query argument on the server when using GraphQL.net like this; public class Droid { public string Id { get; set; } public string Name { get;…
mark_h
  • 5,233
  • 4
  • 36
  • 52
0
votes
1 answer

GraphQL .Net Custom Extensions

Is there an example showing how you can include custom extensions in the results of graphql? I am looking for something like this to be returned with all results: "extensions: { "numberOfResolvers": 100, "timeElapsed": 334 } I am…
The_Outsider
  • 146
  • 8
0
votes
1 answer

GraphQL support for ASP.NET WebAPI

Is there support for GraphQL and classic dotnet i.e ASP.NET WebAPI and not dot net core.I searched that on internet but did not find any useful resource. We have exsisting ASP.NET WebAPI where we need to select and update few columns based on…
sujayadkar
  • 63
  • 1
  • 13
0
votes
1 answer

Many to many with dataLoader in graphql-dotnet

How can we achieve many to many with dataLoader? Lets say i want to fetch the companies with there contacts (and a contact can have multiple companies). I have a companyLinks as midde table (with companyId/contactId). I have this which works when…
flieks
  • 175
  • 1
  • 3
  • 13
0
votes
1 answer

How can I access the Request object from a Field within an ObjectGraphType when using GraphQL.net?

I'm using GraphQL.net with C#. I have a Field within an ObjectGraphType that looks something like this; Field( "baz", resolve: context => { //I want to inspect the Request…
mark_h
  • 5,233
  • 4
  • 36
  • 52
0
votes
1 answer

DotNet Core's GraphQL casting parameter value to integer

I'm using graphql-dotnet (dotnet GraphQl) for implementing GraphQL in DotNet Core 2.1. I have the following classes: public class Customer { public int Id { get; set; } public string Name { get; set; } } public class CustomerInputType :…
Tom Schreck
  • 5,177
  • 12
  • 68
  • 122
0
votes
1 answer

'No parameterless constructor defined for type SiteResourceGraphType' message, when injecting repository into SiteResourceGraphType

I have a SiteResourceGraphType class, which is inherited from ObjectGraphType. SiteResourceGraphType class accepts IGenericRepository in order to resolve items field. When I start my application, I'm getting error 'No parameterless…