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
3 answers

Parallel async queries with GraphQL for .NET and EF Core 3.0

Summary I am currently migrating a project to AspNetCore 3.0 and are running into a issue with the GraphQL for .NET ParallelExecutionStrategy when querying for multiple things in one query. The project is using a MSSQL Server as the data store and…
Ganhammar
  • 1,871
  • 1
  • 16
  • 29
0
votes
1 answer

Build hierarchical object tree in GraphQL.NET

I am building an API that allows you to fetch a hierarchical object tree in GraphQL. These objects are not in a data store but come from some upstream API. For example; public class Employee { public int Id { get; set; } public string…
Steztric
  • 2,832
  • 2
  • 24
  • 43
0
votes
1 answer

GraphQL - Pass Non-Property Variable

I am just starting in GraphQL (with .NET, but I don't think that matters here). I have learned how to pass variables that are properties of the type I am querying, but I am not sure how to pass variables that are NOT properties. For example, I have…
emery.noel
  • 1,073
  • 1
  • 9
  • 24
0
votes
1 answer

What to do when a record is not found for given arguments

I've just started developing a graphQL API using graphql-dotnet. I've searched through the documentation but I couldn't find anything on what to do if a record is not found for given arguments. The reference implementations I checked (github,…
Rudithus
  • 183
  • 13
0
votes
1 answer

GraphQL-dotnet fields Validation Prior Resolving

I'm building GraphQL API in Asp.Net Core 2.2 using GraphQL.Net 2.4.0 I've created Controller to handle GraphQL Queries: [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] public class GraphQLController : Controller { …
Stefan PEev
  • 481
  • 5
  • 17
0
votes
0 answers

Is it possible to change graphql schema once it is initialized

I am using graphql-dotnet and populated schema based on different types (loaded from assembly). Now I would like to add new types to an existing schema without restarting the application server. Is that possible?
Hasibul
  • 569
  • 2
  • 6
  • 21
0
votes
0 answers

Bad Request Error encountered with GraphQL DotNet

I'm using GraphQL.Net and getting the following when trying to use the API. { "version": { "major": 1, "minor": 1, "build": -1, "revision": -1, "majorRevision": -1, "minorRevision": -1 }, "content": { "headers": [ …
Jonas Arcangel
  • 2,085
  • 11
  • 55
  • 85
0
votes
1 answer

The type: Byte cannot be coerced effectively to a GraphQL type

Here is the code that I am using to fetch ByteArrayContent type: public class ImageDTO : APIResult { public byte[] ImageData { get; set; } public string ImageFormat { get; set; } public…
santosh kumar patro
  • 7,231
  • 22
  • 71
  • 143
0
votes
1 answer

How to generate dynamic path value for a graphql query response using GraphQL.NET?

I have REST API (api/tax/v1/countries) with the following response. In the below the pngimagePath and svgimagePath properties are pointing to the image type endpoints(api/tax/v1/country/Country1/{FlagPNG or FlagSVG}) The paths are generated…
santosh kumar patro
  • 7,231
  • 22
  • 71
  • 143
0
votes
1 answer

In GraphQl dot net how we can get projected field names from ResolveFieldContext

I am new in Graphql and using graphql-dotnet in my asp.net core project. Consider I have written a query like following. restaurants { id name } Now I want to get this field names from ResolveFieldContext. Is there any way to get this…
Hasibul
  • 569
  • 2
  • 6
  • 21
0
votes
1 answer

Asp.net core file upload with Graphql-dotnet

I am trying to upload an image file with graphql-dotnet, but it is never successful. I am taking file object in my GraphQLController: var files = this.Request.Form.Files; var executionOptions = new ExecutionOptions { Schema = _schema, …
tcetin
  • 979
  • 1
  • 21
  • 48
0
votes
1 answer

Graphql-dotnet, not able to connect to React application

Currently I am working on GraphQl-dotnet, i was able to create graphql server, now i want to connect the server to my front end, React Application, I tried with Apollo i could not do it can any one help me on it .
Perumal.S
  • 11
  • 4
0
votes
1 answer

Defining ResolveType for GraphQL interfaces from type definition text

Based on an example from graphql-dotnet : public class Droid { public string Id { get; set; } public string Name { get; set; } } public class Query { [GraphQLMetadata("hero")] public Droid GetHero() { return new Droid {…
Majid
  • 3,128
  • 1
  • 26
  • 31
-1
votes
1 answer

"INVALID_OPERATION" error with GraphQL.Net library in .NET Core 3.0

I have a problem with GraphQL.Net library. I've used "GraphQL" Version="3.2.0", "GraphQL.Server.Ui.Playground" Version="4.4.0" and TargetFramework = netcoreapp3.0 I'm trying to see how it works and I created a simple class: public class Temp { …
Galina Melnik
  • 1,947
  • 3
  • 14
  • 19
-1
votes
1 answer

GraphTypeFromType gets NullReferenceException

I'm getting this error using dotnet's bindings for Graphql, what may it be the cause? GraphQL.ExecutionError: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an…
Shoe
  • 74,840
  • 36
  • 166
  • 272
1 2 3 4 5 6
7