I'm currently exploring the GraphQL development and I'm currently exploring what kind of SQL queries are Generated via EF Core and I observed that no matter that my GraphQL query includes only a few fields the EF Core sends SQL Select for all fields…
Let's say I want to be able to query for a user by specifying their ID, or by specifying some other identifier, like email address.
How do you construct the root Query object to accept that?
Given this
public class MyQuery : ObjectGraphType
{
…
I am building a HTTPTriggered Azure Function, targeting netcoreapp3.0, that is running a GraphQL .NET server. GraphQL .NET requires that AllowSynchronousIO is set to true, but I can't figure out how to do that for a Azure Function. I have tried…
How do I convert an enum to the EnumerationGraphType that GraphQL uses?
Here is an example to illustrate what I'm talking about:
public enum MeetingStatusType
{
Tentative,
Unconfirmed,
Confirmed,
}
public class MeetingDto
{
public…
I am looking for sample code and examples regarding how to implement authorization at resolver function level using GraphQL.NET and ASP.NET CORE 2.
Basically I am trying to prevent the execution of query if the request is not authorized.
Can anyone…
I'm using a couple of dataloaders that use injected query services (which in turn have dependencies on a DbContext). It looks something like this:
Field>(
"Users",
resolve: context =>
{
var loader =…
I want to register alarms on my server application. To prevent passing 10+ arguments, I serialize my alarm on client side and pass it as List to my server. Deserialize it, register it and give the answer of an registered alarm.
Now my…
I'm trying to build a mutation within relay that includes a file. As soon as I implement the getFiles() method referenced here: https://facebook.github.io/relay/docs/api-reference-relay-mutation.html#getfiles
Relay sends a multipart request causing…
I am developing asp.net core 3.1 GraphQL based APIs. I used the below reference article to setup automatic DI configuration in the API layer and have used the nuget package :…
I am using for GraphQL for .NET package for graphql. But I couldn't understand how can I authentication with JWT in graphql query or mutation.
I read the guide about authorization but I couldn't accomplish.
I need help with GraphQL for .NET…
I am trying to create a mutation that takes an input type FooInputType. My problem is having a field on that input to represent a JSON dictionary(string-string). for example, foo.tags field could have any set of key-value pairs of type…
In GraphQL .Net most of the example code has one top level mutations graph object that has many actual mutations defined within it.
Here's an example from the GraphQL .NET mutations page:
public class StarWarsSchema : Schema
{
public…
The error happens when it reaches services.AddGraphQL.
I tried downgrading the version of GraphQL to 2.4 but then FuncServiceProvider stops working.
Here's what I have:
MarketScheme.cs
public class MarketScheme : Schema
{
public…
In C# it's possible to create an Enum with a Flags Attribute.(https://learn.microsoft.com/en-us/dotnet/api/system.flagsattribute?view=netstandard-2.1)
This means that that an Enum can look like this:
[Flags]
enum EnumWithFlags
{
None = 0,
…
I have a simple schema that I'm trying to query as follows:
{
subQuery {
subObjectGraph {
Name
}
}
}
But "graphiql" throws the following error, without even seeming to run my query.
{
"errors": [
{
"message":…