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
I've recently found an issue while testing one of my component using useQueryLoader.
My query contains an optional countEach param that has a default value = 10.
In my code, I'm calling the searchCallback without passing countEach, so in the MockEnvironment, my variables query doesn't have the variable countEach. However, the variables from the operationDescriptor query contains that countEach param, so the comparison on that line returns false, so the query is not retrieved and the mock fails.
The quick solution is to pass the variable to my searchCallback variables, but then I no longer benefit of the default value set on the param. Is there any other solution I am missing? Maybe at the resolver level. Otherwise I believe it may be an issue in the MockEnvironment.
Thanks in advance for any help.
The text was updated successfully, but these errors were encountered:
Hello,
I've recently found an issue while testing one of my component using
useQueryLoader
.My query contains an optional
countEach
param that has a default value= 10
.In my code, I'm calling the searchCallback without passing
countEach
, so in the MockEnvironment, my variables query doesn't have the variablecountEach
. However, the variables from the operationDescriptor query contains thatcountEach
param, so the comparison on that line returns false, so the query is not retrieved and the mock fails.The quick solution is to pass the variable to my searchCallback variables, but then I no longer benefit of the default value set on the param. Is there any other solution I am missing? Maybe at the resolver level. Otherwise I believe it may be an issue in the MockEnvironment.
Thanks in advance for any help.
The text was updated successfully, but these errors were encountered: