apollo-feature-requests icon indicating copy to clipboard operation
apollo-feature-requests copied to clipboard

Add @client support on argument level

Open Sachanski opened this issue 1 year ago • 0 comments

Hello and thank you for the great project!

I am opening this feature request as a result of this discussion.

What I was basically trying to achieve (and managed to thanks to some invaluable input from @jerelmiller) is to have custom arguments passed only to the type policies of the apollo client and not send them to the server.

After a bit of reading I came accross the @client directive provided by Apollo, however it is applicable only on a field level. What I was basically looking for was applying this directive on an argument.

The solution that @jerelmiller led me to implement works perfectly fine for me, but since he suggested opening a feature request I thought it might be a good idea to share it here as well (if the code snippet I posted helps in any way in the implementation of such a feature - all the better).

Best regards

Sachanski avatar Mar 25 '24 21:03 Sachanski