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
Running apollo-server 3.8.2 using this package, l have the following in the schema:
extend type Query {
searchForFonts(
pageSize: Int @constraint(min: 1, max: 25)
): FontSearchResponse!
}
If I send a pageSize value of -1 I correctly get an error of it being below the minimum. However, if I pass a pageSize of 0, it doesn't flag an error at all.
I suspect possibly this is an issue with apollo-server (where he won't call parseValue at all because of a stray if(value) check) but wanted to check and see if anyone had run into this before?
Thanks
The text was updated successfully, but these errors were encountered:
Have you tried to make pageSize mandatory, or maybe set the default value for it as a workaround? This definitely looks like it treats 0 as a not set value at all 😕
Hello,
Running
apollo-server
3.8.2 using this package, l have the following in the schema:If I send a
pageSize
value of-1
I correctly get an error of it being below the minimum. However, if I pass apageSize
of0
, it doesn't flag an error at all.I suspect possibly this is an issue with
apollo-server
(where he won't callparseValue
at all because of a strayif(value)
check) but wanted to check and see if anyone had run into this before?Thanks
The text was updated successfully, but these errors were encountered: