-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
Coerce non-null values into lists of size one #1376
Conversation
As per the specification, if a value passed as an input to a list type is not a list and is not null then it should be coerced into a list of size one.
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.
Looks great, thanks! 🙏
d006661
to
edae8bf
Compare
I can't get |
@guymers what compilation error are you seeing on Scala 3? I saw that you replaced |
Maybe ran into this? scala/scala3#13044 |
Yeah its that. Defining a schema and arg builder for |
Thanks for the fix and adding all the test cases! |
* upgrade zio-config to 2.0.0 (#1367) * Update http4s-blaze-server to 0.23.12 (#1368) * Properly validate floating point numbers on input (#1370) * Escape quotes in description strings (#1372) Escape " with \" in normally quoted strings and """ with \""" in triple-quoted strings. https://spec.graphql.org/October2021/#sec-String-Value * Improve persisted query performance by caching the document (#1371) * improve persisted query performance by caching the document instead of the unparsed string. * address comments * Escape special characters in normally quoted strings (#1373) * Correct field types for interface fields on union (#1375) Ensure that when an interface fragment is used on a union that the fields its selected have the correct type instead of always being `String`. * Coerce non-null values into lists of size one (#1376) * Coerce non-null values into lists of size one As per the specification, if a value passed as an input to a list type is not a list and is not null then it should be coerced into a list of size one. * Make work on Scala 3 * Client auto-gen Option conflict (#1377) * have ClientWriter print scala.Option instead of Option * Fix replace case where Option may appear multiple times * Add test for various returns of GQL Option and scala.Option * run fmt * update ClientWriterViewSpec * SchemaWrite should also print scala.Option instead of Option * add a scripted test with a schema containing type Option * flatten scripted compile tests * make helper method for safe Option string replacement * add support for graphql-transport-ws (#1354) * add support for graphql-transport-ws * Set api mappings for ZIO (#1381) Co-authored-by: Lordie <levimanga@gmail.com> Co-authored-by: Scala Steward <43047562+scala-steward@users.noreply.github.com> Co-authored-by: Kevin Mooney <moonkev@users.noreply.github.com> Co-authored-by: Johannes Eriksson <johannes@stepzen.com> Co-authored-by: Paul Daniels <paulpdaniels@gmail.com> Co-authored-by: Mark Rudolph <mark@k8ty.app>
As per the specification, if a value passed as an input to a list type is
not a list and is not null then it should be coerced into a list of size
one.