-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Explicit Resource Management docs and improvements #3567
Conversation
🦋 Changeset detectedLatest commit: 4e7f89d The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Apollo Federation Subgraph Compatibility Results
Learn more: |
✅ Benchmark Results
|
💻 Website PreviewThe latest changes are available as preview in: https://888bad4a.graphql-yoga.pages.dev |
website/src/pages/docs/features/explicit-resource-management.mdx
Outdated
Show resolved
Hide resolved
website/src/pages/docs/features/explicit-resource-management.mdx
Outdated
Show resolved
Hide resolved
795f473
to
4743ee9
Compare
website/src/pages/docs/features/explicit-resource-management.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Laurin Quast <[email protected]>
what are the most common things people would use this for in Yoga? |
website/src/pages/docs/features/explicit-resource-management.mdx
Outdated
Show resolved
Hide resolved
website/src/pages/docs/features/explicit-resource-management.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Dimitri POSTOLOV <[email protected]>
website/src/pages/docs/features/explicit-resource-management.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Dimitri POSTOLOV <[email protected]>
website/src/pages/docs/features/explicit-resource-management.mdx
Outdated
Show resolved
Hide resolved
@Urigo For example in Hive Client Plugin, it creates a queue of background HTTP calls sending the reports to Hive Console. And in case of shutdown, we need to flush the queue and make sure all reports are sent. |
</Tabs.Tab> | ||
</Tabs> | ||
|
||
In the first example, we use the `await using` syntax to create a new instance of `yoga` and dispose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this part could have been part of the tab itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, we can also explain the scope { ... }
and put it next to the example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this look better now?
website/src/pages/docs/features/explicit-resource-management.mdx
Outdated
Show resolved
Hide resolved
website/src/pages/docs/features/explicit-resource-management.mdx
Outdated
Show resolved
Hide resolved
so its not actually for gateway developers but just for plugin developers? |
|
website/src/pages/docs/features/explicit-resource-management.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved with one small name improvement. I don't like using these kind of abbreviations ("\w")
Co-authored-by: Laurin Quast <[email protected]>
After the discussion with @n1ru4l ;
Some changes are done in
@whatwg-node/server
, so in order to configure the new feature (including the new hook);disposeOnProcessTerminate
dispose
method,onDispose
hook,ctx.waitUntil
and everything related to the things related to the resource management and graceful shutdowncc @EmrysMyrddin about graphql-hive/console#6128