Implicitly passing variables to GraphQL operations

Alf Jonassen
Published in
6 min readDec 10, 2019

This post aims to explain how you can avoid explicitly passing variables to GraphQL API requests by instead utilizing the Apollo (GraphQL) Client, a custom Apollo Link and a modified Apollo Client cache. Our solution aims to solve the problem of having to explicitly pass a variable everywhere it is required by instead analyzing each GraphQL operation and including the variable only if required.