You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.
Hi David Lee, thank you very much for the update to the GraphQL version of .NET. I have started to switch to this version and have found a few problems. I am using two Querys variables with optional values. These are now throwing an exception in the new version.
Hi @rheid - This is a known issue with GraphQL.NET library where I have reported it in graphql-dotnet/relay#72. In the meantime, the workaround is to create a separate endpoint to host your paging implementation.
@seekdavidlee Thank you for your super quick reply. I am quite sure that I have understood this correctly or that I can implement it. Do you have an example? Should these endpoints be implemented again under a different name for the paging?
public static class GraphQLFunction { [ExecutionContextDependencyInjection(typeof(FunctionModule))] [FunctionName("graphql")] public static async Task<IActionResult> Run( [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, ILogger log, ExecutionContext executionContext) { return await executionContext.ProcessGraphQlRequest(req); } }
Yes @rheid - You can refer to the example project where in my same project Eklee.Azure.Functions.GraphQl.Example, I have multiple endpoints. You would create a new Azure Function, new AutoFac Module, new Mutation, new Query specifically for each paging Model you are exposing. Via dependency injection, they are seen as different instances, and so the error from GraphQL.NET wouldn't surface.
Hi David Lee, thank you very much for the update to the GraphQL version of .NET. I have started to switch to this version and have found a few problems. I am using two Querys variables with optional values. These are now throwing an exception in the new version.
2021-01-24T17:08:49.819Z] Executed 'graphql' (Failed, Id=02497ed2-43ed-44cb-86f5-949e83684772, Duration=17089ms)
[2021-01-24T17:08:49.821Z] System.Private.CoreLib: Exception while executing function: graphql. GraphQL: Unable to register GraphType 'GraphQL.Types.Relay.ConnectionType
2[[Eklee.Azure.Functions.GraphQl.ModelConventionType
1[[genesis.com.api.Models.Page, genesis.com.api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Eklee.Azure.Functions.GraphQl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[GraphQL.Types.Relay.EdgeType1[[Eklee.Azure.Functions.GraphQl.ModelConventionType
1[[genesis.com.api.Models.Page, genesis.com.api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Eklee.Azure.Functions.GraphQl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], GraphQL, Version=3.3.1.0, Culture=neutral, PublicKeyToken=null]]' with the name 'ModelConventionConnection';the name 'ModelConventionConnection' is already registered to 'GraphQL.Types.Relay.ConnectionType
2[[Eklee.Azure.Functions.GraphQl.ModelConventionType
1[[genesis.com.api.Models.Event, genesis.com.api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Eklee.Azure.Functions.GraphQl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null],[GraphQL.Types.Relay.EdgeType1[[Eklee.Azure.Functions.GraphQl.ModelConventionType
1[[genesis.com.api.Models.Event, genesis.com.api, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Eklee.Azure.Functions.GraphQl, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]], GraphQL, Version=3.3.1.0, Culture=neutral, PublicKeyToken=null]]'.The text was updated successfully, but these errors were encountered: