Skip to content

Commit

Permalink
Update .changeset/spotty-toes-help.md
Browse files Browse the repository at this point in the history
Co-authored-by: Laurin Quast <[email protected]>
  • Loading branch information
ardatan and n1ru4l authored Jan 2, 2025
1 parent 73596cc commit f8aeaac
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .changeset/spotty-toes-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,9 @@
'@graphql-hive/yoga': patch
---

Align with GraphQL Yoga >=5.10.4 which has the relevant features mentioned below;

- Remove \`tiny-lru\` dependency, and use `createLruCache` from `graphql-yoga`
- - Yoga already provides a LRU cache implementation, so we can use that instead of having a separate dependency
- Use Explicit Resource Management of GraphQL Yoga plugins for disposal which already respect Node.js process termination
- - The feature has been implemented in `@whatwg-node/server` which is used by GraphQL Yoga. [Learn more about this feature](https://github.com/ardatan/whatwg-node/pull/1830)
- Use \`context.waitUntil\` which is handled by the environment automatically, if not `@whatwg-node/server` already takes care of it with above.
- - The feature has been implemented in `@whatwg-node/server` which is used by GraphQL Yoga. [Learn more about this feature](
https://github.com/ardatan/whatwg-node/pull/1830)
- Respect the given `fetchAPI` by GraphQL Yoga(might be Hive Gateway) for the `fetch` function
- - Hive Gateway uses `fetchAPI` given to GraphQL Yoga for the entire Fetch API implementation, so if Hive Client respects that, we have a control over HTTP calls done internally by the gateway
- Respect Yoga's \`logger\` for logging
- - Similar to above, we want to respect the logger provided by Yoga to have a better control over logging
- Upgrade to `graphql-yoga` >= `5.10.4`
- Improve graceful process termination on Node.js by leveraging `graphql-yoga`'s [dispose lifecycle hooks](https://the-guild.dev/graphql/yoga-server/docs/features/envelop-plugins#ondispose)
- Improve Cloudflare Worker runtime support by registering pending usage reporting requests using the [`waitUntil` API](https://developers.cloudflare.com/workers/runtime-apis/context/#waituntil)
- Use the logger instance from the `graphql-yoga` instance, for a more unified logging experience
- Use the `fetch` API implementation on the `graphql-yoga` instance for HTTP calls
- Replace the internal \`tiny-lru\` dependency with `graphql-yoga`'s internal LRU cache implementation

0 comments on commit f8aeaac

Please sign in to comment.