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
Is your feature request related to a problem? Please describe.
Current query arg syntax is unwiedly, and involves the use of an extension method to convert a C# type into a graph type. Yes, it should be up to the user to supply the correct graph-type, but there should be an easier way so user does not have to think too much of the type or conversions before passing it in.
Describe the solution you'd like
Something simple, and easy for the user without giving up their control of the type being passed, but without conversion, such as:
services.AddGraphQL().Query<Author>(()=>newQuery(){Expression="author",Args=newArgList(){["authorId"]=(longauthorId)=>{DefaultValue=0,Description="The Author to be searched"},["bookId"]=(longbookId)=>{DefaultValue=0,Description="The Book to be searched"},["bookName"]=(stringbookName)=>{DefaultValue=null,Description="The name of the Book to be searched"},},Resolver=(context)=>authorRepo.GetAll().Where(a =>a.AuthorId==(long)context.Arguments["authorId"])}).Build()
Describe alternatives you've considered
Improving the conversion syntax may also be helpful, but the real solution I feel is change how the arguments are added, in GraphQL.NET is equally painful
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Current query arg syntax is unwiedly, and involves the use of an extension method to convert a C# type into a graph type. Yes, it should be up to the user to supply the correct graph-type, but there should be an easier way so user does not have to think too much of the type or conversions before passing it in.
Describe the solution you'd like
Something simple, and easy for the user without giving up their control of the type being passed, but without conversion, such as:
Describe alternatives you've considered
Improving the conversion syntax may also be helpful, but the real solution I feel is change how the arguments are added, in GraphQL.NET is equally painful
The text was updated successfully, but these errors were encountered: