Skip to content

feat(graphql): refactor service#851

Merged
stdevi merged 15 commits into
masterfrom
stdevi/graphql
Jun 4, 2026
Merged

feat(graphql): refactor service#851
stdevi merged 15 commits into
masterfrom
stdevi/graphql

Conversation

@stdevi

@stdevi stdevi commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread packages/javascript-api/src/lib/services/graphql/graphql.service.ts
Comment thread packages/javascript-api/src/lib/services/graphql/graphql.service.ts
Comment thread packages/javascript-api/src/lib/services/graphql/graphql.service.ts
Comment thread packages/javascript-api/src/lib/services/graphql/graphql.service.ts Outdated
Comment thread packages/javascript-api/src/lib/services/graphql/graphql.service.ts
Comment thread packages/javascript-api/src/lib/services/graphql/graphql.service.ts Outdated
@stdevi stdevi requested review from 2ndalpha and raluik June 2, 2026 18:04
@stdevi stdevi marked this pull request as ready for review June 3, 2026 07:29

@raluik raluik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 1 issue worth looking into.

  • issue: dashboard doesn't receive connection loss status anymore:
Screen.Recording.2026-06-03.at.15.13.36.mov

Notes:

Use qminder bind-javascript-api and then yarn build in javascript-api to see javascript-api changes.


private handleBrowserOnline(): void {
if (this.offlineSince === null) {
this.logger.warn('Browser came back online');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion(non-blocking): should it be a warn, not info? Same here.

suggestion(non-blocking): maybe Browser came online as back would indicate that it dropped unexpectedly?

Comment thread packages/javascript-api/src/lib/services/graphql/graphql.service.ts Outdated
Comment thread packages/javascript-api/src/lib/services/graphql/graphql.service.ts
Comment on lines +90 to +92
service.handleBrowserOffline();
jest.advanceTimersByTime(5000);
service.handleBrowserOnline();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

polish: could do window.dispatchEvent(new Event('offline')) and ... Already do in other JSDOM spec file.


await jest.runOnlyPendingTimersAsync();

expect(backoffSpy).toHaveBeenCalled();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion(non-blocking): maybe toHaveBeenCalledTimes(1)?

@stdevi stdevi requested a review from raluik June 3, 2026 11:22
@stdevi stdevi requested a review from raluik June 4, 2026 07:28
@stdevi stdevi added this pull request to the merge queue Jun 4, 2026
Merged via the queue into master with commit 30b9691 Jun 4, 2026
10 checks passed
@stdevi stdevi deleted the stdevi/graphql branch June 4, 2026 07:42
@stdevi stdevi mentioned this pull request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants