Page MenuHomeElementl

Try to resolve graphql schema loading race conditions in Jest

Authored by dish on Nov 20 2020, 9:34 PM.



I keep running into Jest race conditions that seem related to loading the schema.graphql file. I haven't really figured out what's going on, it just appears that the Apollo cache is somehow being written with certain fields missing.

This is a bit of a shot in the dark, as I haven't seen any GH issues that quite match what I'm seeing here.

Test Plan


Diff Detail

R1 dagster
Lint Not Applicable
Tests Not Applicable

Event Timeline

dish requested review of this revision.Nov 20 2020, 9:38 PM

How is it any different to move the function call outside of the function?

As I said, shot in the dark. I'm kind of at a loss to understand what's broken here. Given that loader doesn't appear to be async, I'm not sure why one thing works and another doesn't.

This revision is now accepted and ready to land.Nov 23 2020, 5:42 PM