1

I need to be able to use server resolvers in development env, but in all other evs, I want to use the client resolvers. I was checking if there is an elegant way to skip the @client directive in development.

For now, it seems that the simplest is to wrap the query that is passed into gql with a custom function that would remove the default @client directive.

  • 1
    I solved it with a simple helper function `allEvents(filter: $filter) ${toggleClientDirective()} { ...}` which based on a condition returns either `@client` or "" – Sándor Turánszky Oct 07 '20 at 19:17

0 Answers0