In one of my components, I'm immediately querying my backend. Afterwards, I want to query my backend again with the data from my first query, so the variables of my second query are from the first.
I've tried useLazyQuery but either it does not work, or I'm incorrectly placing it. I've tried using skip in the useQuery hook but it doesn't seem to work, because I'm the condition I'm testing against to skip, is also the variable I'm using for the query itself, and I'm checking whether or not it is defined.
I'd rather not use compose as I'm mainly working with hooks in my React Component and I'm not sure of how to structure them and fit them in with my code.
I’m also using both query results separately. My backend is structured like a tree so I’m using both one node and its child.