INNER CODE UNIT · TypeScript
Promise
microsoft/graphitation · packages/apollo-forest-run/compat/src/core/__tests__/QueryManager/index.ts:4924
return new Promise(res => setTimeout(res, 10)).then(() => {
// Make sure the QueryManager cleans up legacy one-time queries like
// the one we requested above using refetchQueries.
queryManager["queries"].forEach((queryInfo, queryId) => {
expect(queryId).not.toContain("legacyOneTimeQuery");
});
}).then(resolve, reject);
} else {
reject("too many results");
}
});
});
itAsync('also works with a conditional function that returns false', (resolve, reject) => {
const mutation = gql`
mutation changeAuthorName {
changeAuthorName(newName: "Jack Smith") {
firstName