Skip to content

Releases: graphql-hive/envelop

November 06, 2025

06 Nov 14:34
8679e93

Choose a tag to compare

@envelop/[email protected]

Minor Changes

  • 0434fbd
    Thanks @ardatan! - Export documentStringMap to set a value for
    getDocumentString externally

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

October 29, 2025

29 Oct 10:35
08f6e1d

Choose a tag to compare

@envelop/[email protected]

Minor Changes

  • #2742
    62a8915
    Thanks @enisdenjo! - Introduce new option onDocument

    It's a callback that is invoked when the document is assembled by the visitor.

@envelop/[email protected]

Patch Changes

October 06, 2025

06 Oct 10:20
4c46755

Choose a tag to compare

@envelop/[email protected]

Minor Changes

@envelop/[email protected]

Patch Changes

September 19, 2025

19 Sep 08:21
2b6b5d7

Choose a tag to compare

@envelop/[email protected]

Patch Changes

  • #2690
    8f709a7
    Thanks @Tolsee! - Fix rate limiting being wrongly applied to all
    fields with a default configuration.

@envelop/[email protected]

Minor Changes

  • #2258
    35539a7
    Thanks @EmrysMyrddin! - Deprecate ttlPerType in favor of
    ttlPerSchemaCoordinate, for a more streamlined API

    Migration instructions

    If you where using ttlPerType, you can merge the object into the ttlPerSchemaCoordinate, the
    syntax doesn't change.

    useResponseCache({
      session: null,
    - ttlPerType: {
    -   User: 10_000,
    -   Profile: 600_000,
    - },
      ttlPerSchemaCoordinate: {
        'Query.me': 0
    +    User: 10_000,
    +    Profile: 600_000,
      }
    })

@envelop/[email protected]

Patch Changes

September 18, 2025

18 Sep 12:20
5d852c2

Choose a tag to compare

@envelop/[email protected]

Patch Changes

  • #2665
    92948d8
    Thanks @EmrysMyrddin! - Fix getters and setters being stripped
    away. The value was copied at plugin creation instead of copying the getter and setter (if any).

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Minor Changes

  • #2676
    6164637
    Thanks @EmrysMyrddin! - Validate the configuration at schema
    loading time. The plugin now throws an error on invalid configuration, such as:
    • Multiple field configuration matching the same field
    • A field configuration matching a field already having a directive

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

September 05, 2025

05 Sep 02:09
f1fbe8c

Choose a tag to compare

@envelop/[email protected]

Patch Changes

  • #2611
    8dd5bda
    Thanks @EmrysMyrddin! - Add a withState override to ease the
    typing of plugins whith the same state for all scopes.

@envelop/[email protected]

Patch Changes

June 20, 2025

20 Jun 19:03
9f0d6ff

Choose a tag to compare

@envelop/[email protected]

Minor Changes

  • #2607
    3ebaa3b
    Thanks @EmrysMyrddin! - Added new withState plugin utility
    for easy data sharing between hooks.

    New plugin utility to ease data sharing between hooks

    Sometimes, plugins can grow in complexity and need to share data between its hooks.

    A way to solve this can be to mutate the graphql context, but this context is not always available
    in all hooks in Yoga or Hive Gateway plugins. Moreover, mutating the context gives access to your
    internal data to all other plugins and graphql resolvers, without mentioning performance impact on
    field access on this object.

    The recommended approach to this problem was to use a WeakMap with a stable key (often the
    context or request object). While it works, it's not very convenient for plugin developers,
    and is prone to error with the choice of key.

    The new withState utility solves this DX issue by providing an easy and straightforward API for
    data sharing between hooks.

    import { withState } from '@envelop/core'
    
    type State = { foo: string }
    
    const myPlugin = () =>
      withState<Plugin, State>(() => ({
        onParse({ state }) {
          state.forOperation.foo = 'foo'
        },
        onValidate({ state }) {
          const { foo } = state.forOperation
          console.log('foo', foo)
        }
      }))

    The state payload field will be available in all relevant hooks, making it easy to access shared
    data. It also forces the developer to choose the scope for the data:

    • forOperation for a data scoped to GraphQL operation (Envelop, Yoga and Hive Gateway)
    • forRequest for a data scoped to HTTP request (Yoga and Hive Gateway)
    • forSubgraphExecution for a data scoped to the subgraph execution (Hive Gateway)

    Not all scopes are available in all hooks, the type reflects which scopes are available

    Under the hood, those states are kept in memory using WeakMap, which avoid any memory leaks.

    It is also possible to manually retrieve the state with the getState function:

    const myPlugin = () =>
      withState(getState => ({
        onParse({ context }) {
          // You can provide a payload, which will dictate which scope you have access to.
          // The scope can contain `context`, `request` and `executionRequest` fields.
          const state = getState({ context })
          // Use the state elsewhere.
        }
      }))

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

Read more

March 06, 2025

06 Mar 15:37
e55f53a

Choose a tag to compare

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

  • Updated dependencies
    [914f9ed,
    [914f9ed](https://...
Read more

March 06, 2025

06 Mar 10:52
7b5db86

Choose a tag to compare

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

Read more

March 05, 2025

05 Mar 10:53
93e04d7

Choose a tag to compare

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

@envelop/[email protected]

Patch Changes

  • ...
Read more