Page MenuHomePhabricator

Try to resolve graphql schema loading race conditions in Jest
ClosedPublic

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

Details

Summary

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

Jest

Diff Detail

Repository
R1 dagster
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dish requested review of this revision.Fri, Nov 20, 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.Mon, Nov 23, 5:42 PM