I got a troubles with the testing of my GenServer.
I’m testing my GraphQL API. In the resolver of mutation I have a peace of code, which put some data to GenServer.cast and save entity to DB in async way. This entity has foreign key (user_id). As a results I get error ‘foreign_key_constraint’ all the time in my tests. After some debug I see that in this async process DB is empty. For me it looks like GenServer process run separately, out of test scope.
How can I solve this issue and check the full flow - sync resolver together with async genserver?
Thans in advance!