-
Notifications
You must be signed in to change notification settings - Fork 129
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
make the context referentialy stable #1911
Conversation
🦋 Changeset detectedLatest commit: af1cec7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
🚀 Snapshot Release (
|
Package | Version | Info |
---|---|---|
@envelop/core |
4.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/apollo-datasources |
3.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/apollo-federation |
4.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/apollo-server-errors |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/apollo-tracing |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/auth0 |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/dataloader |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/depth-limit |
3.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/disable-introspection |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/execute-subscription-event |
4.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/extended-validation |
3.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/filter-operation-type |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/fragment-arguments |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/generic-auth |
6.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/graphql-jit |
6.0.3-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/graphql-middleware |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/graphql-modules |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/immediate-introspection |
2.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/live-query |
6.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/newrelic |
6.0.3-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/on-resolve |
3.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/opentelemetry |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/operation-field-permissions |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/parser-cache |
6.0.3-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/persisted-operations |
6.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/preload-assets |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/prometheus |
8.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/rate-limiter |
5.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/resource-limitations |
4.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/response-cache |
5.3.1-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/response-cache-redis |
3.3.1-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/sentry |
6.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/statsd |
4.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/validation-cache |
6.0.3-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
@envelop/testing |
6.0.2-alpha-20230908154216-af1cec7c |
npm ↗︎ unpkg ↗︎ |
💻 Website PreviewThe latest changes are available as preview in: https://a9495798.envelop.pages.dev |
✅ Benchmark Results
|
88050dc
to
935a638
Compare
fdaa353
to
353bd4c
Compare
Description
Today, when the context is extended via the provided
extendContext
parameter, the context is mutated or cloned depending on the hook.This PR aims to unify the behaviour of every hooks by always mutating the context when extending. This avoid to create unnecessary object instances and to have a referentially stable context object.
The reference stability is usefull to allow plugins to reference the context outside of envelop hooks. Here an example of usage with a DAO relying on context for some its methods. Without referential stability, developer will always have to give the context as a parameter.
Type of change
Please delete options that are not relevant.
expected) => I'm not sure if this is a breaking change. It could, but I think most of the time, this behaviour is the one expected
Checklist:
CONTRIBUTING doc and the
style guidelines of this project