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 use several includes and skips in my queries. They are working fine in the app. However, while writing tests for the code, I noticed that any field or fragment marked with include is always omitted. I tested it with skip and it was the same. If i leave out the include, the correct object is returned.
Is this issue known? Is there a workaround? (without having to remove the directives)
@asaadreh-meister To get the variables properly mapped onto your selection set you should be able to use the from(_ mock: withVariables:) method on your selection set and pass in the variables being used for your include/skip conditions.
Going to go ahead and close this since the above comment should resolve the issue, feel free to comment if this is still an issue and we can reopen and investigate.
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.
Summary
I use several
include
s andskip
s in my queries. They are working fine in the app. However, while writing tests for the code, I noticed that any field or fragment marked withinclude
is always omitted. I tested it with skip and it was the same. If i leave out the include, the correct object is returned.Is this issue known? Is there a workaround? (without having to remove the directives)
Version
1.15.1
Steps to reproduce the behavior
My query looks like this:
A very basic test is:
Any field or fragment that has
include
in it is returned as nil in the mocks. In the actual app it works fine.Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: