aPureBase / KGraphQL

Pure Kotlin GraphQL implementation
https://kgraphql.io
MIT License
307 stars 58 forks source link

Increase query resolver's function arguments: 9 to 19 #172

Open ima9dan opened 2 years ago

ima9dan commented 2 years ago

The maximum function argument for the query resolver was 9. However, there were cases where that was not enough, so I added it.

example

query ("test") {
    description = "test"
    resolver {
        arg1:String?, arg2:String?, arg3:String?, arg4:String?, arg5:String?, arg6:String?, arg7:String?,
            arg8:String?, arg9:String?, arg10:String?, arg11:String?,arg12:String?,arg13:String?,arg14:String?,
            arg15:String?, arg16:String?, arg17:String?, arg18:String?, arg19:String? ->

        true
    }
}
xplayerCZ commented 2 years ago

Isn't grouping arguments in object a better way to approach this issue? Like Filter, Sort etc. This number of arguments seems brutal for production use.