Skip to content

November 19, 2024

Compare
Choose a tag to compare
@theguild-bot theguild-bot released this 19 Nov 16:24
· 272 commits to master since this release
2acdf6e

@graphql-mesh/[email protected]

Minor Changes

  • #7958
    355203c
    Thanks @enisdenjo! - Allow KV bindings in ES modules format

    The new ES modules format of Cloudflare Workers does not set the bindings in the global scope,
    instead it sets them inside the env argument of the fetch handler.

    wrangler.toml

    These
    KV namespaces in wrangler.toml
    would be used as following.

    kv_namespaces = [
      { binding = "MY_KV", id = "<ID>" }
    ]

    Bindings in ES modules format

    import CloudflareKVCacheStorage from '@graphql-mesh/cache-cfw-kv'
    
    export default {
      async fetch(request, env, ctx) {
        const cache = new CloudflareKVCacheStorage({ namespace: env.MY_KV })
      }
    }

    Bindings in Service Worker format (legacy)

    import CloudflareKVCacheStorage from '@graphql-mesh/cache-cfw-kv'
    
    addEventListener('fetch', async event => {
      const cache = new CloudflareKVCacheStorage({ namespace: 'MY_KV' })
    })

@graphql-mesh/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes

@omnigraph/[email protected]

Patch Changes

@omnigraph/[email protected]

Patch Changes

@omnigraph/[email protected]

Patch Changes

@graphql-mesh/[email protected]

Patch Changes