-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to rename, describe and set default arguments using DeriveObjectSetting
s.
#339
Allow to rename, describe and set default arguments using DeriveObjectSetting
s.
#339
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for working on this feature! It looks great 👍
build.sbt
Outdated
@@ -1,6 +1,6 @@ | |||
name := "sangria" | |||
organization := "org.sangria-graphql" | |||
version := "1.3.3" | |||
version := "1.3.4-SNAPSHOT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I missed this one :)
getArgument(pos, methodName, argName).right.map{ | ||
case arg if argType <:< arg.typeSignature.resultType ⇒ Nil | ||
case arg ⇒ List( | ||
pos → s"Wrong type of default value '$default' for argument '$argName' of method '$methodName': expected '${arg.typeSignature.resultType}', but got '$argType'." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we would need to rely on the standard set of validations for a default value type. It is based on ArgumentType
, ToInput
type-classes as well as some run-time validations. It still will provide the same compile-time guarantees. It's a minor thing, I will adjust it after the merge.
Thank you for accepting my changes. |
#318: Added the following
DeriveObjectSetting
s:MethodArgumentRename
MethodArgumentDescription
MethodArgumentsDescription
MethodArgumentDefault
MethodArgument