This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Waits for a subscription after a trigger function is called. The trigger function is delayed to | |
* properly time the subscription return event. | |
*/ | |
const waitForSubscription = async <TResult = any>( | |
subscription: DocumentNode, | |
trigger: () => Promise<void> | |
): Promise<ExecutionResult<TResult>> => { | |
const iterator = await subscribe<TResult>( | |
schema, |