Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/unlucky-pillows-retire.md

This file was deleted.

37 changes: 0 additions & 37 deletions .changeset/young-bears-tease.md

This file was deleted.

46 changes: 46 additions & 0 deletions packages/plugins/response-cache-cloudflare-kv/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# @envelop/response-cache-cloudflare-kv

## 1.0.0

### Minor Changes

- [#2238](https://github.com/n1ru4l/envelop/pull/2238)
[`430ee7d`](https://github.com/n1ru4l/envelop/commit/430ee7d78dea04d0a44312bdfd16062a675d9772)
Thanks [@ardatan](https://github.com/ardatan)! - BREAKING: Now the cache implementation does not
require the `ExecutionContext` or `KVNamespace` instance but only the name of the namespace

```ts
import { createSchema, createYoga, YogaInitialContext } from 'graphql-yoga'
import { useResponseCache } from '@envelop/response-cache'
import { createKvCache } from '@envelop/response-cache-cloudflare-kv'
import { resolvers } from './graphql-schema/resolvers.generated'
import { typeDefs } from './graphql-schema/typeDefs.generated'

export type Env = {
GRAPHQL_RESPONSE_CACHE: KVNamespace
}

const graphqlServer = createYoga<Env & ExecutionContext>({
schema: createSchema({ typeDefs, resolvers }),
plugins: [
useResponseCache({
cache: createKvCache({
KVName: 'GRAPHQL_RESPONSE_CACHE',
keyPrefix: 'graphql' // optional
}),
session: () => null,
includeExtensionMetadata: true,
ttl: 1000 * 10 // 10 seconds
})
]
})

export default {
fetch: graphqlServer
}
```

### Patch Changes

- Updated dependencies
[[`430ee7d`](https://github.com/n1ru4l/envelop/commit/430ee7d78dea04d0a44312bdfd16062a675d9772)]:
- @envelop/response-cache@6.2.0

## 0.3.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/response-cache-cloudflare-kv/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@envelop/response-cache-cloudflare-kv",
"version": "0.3.0",
"version": "1.0.0",
"type": "module",
"repository": {
"type": "git",
Expand Down Expand Up @@ -51,7 +51,7 @@
"typings": "dist/typings/index.d.ts",
"peerDependencies": {
"@cloudflare/workers-types": "^4.20231121.0",
"@envelop/response-cache": "^6.1.2",
"@envelop/response-cache": "^6.2.0",
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
},
"peerDependenciesMeta": {
Expand Down
9 changes: 9 additions & 0 deletions packages/plugins/response-cache/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @envelop/response-cache

## 6.2.0

### Minor Changes

- [#2238](https://github.com/n1ru4l/envelop/pull/2238)
[`430ee7d`](https://github.com/n1ru4l/envelop/commit/430ee7d78dea04d0a44312bdfd16062a675d9772)
Thanks [@ardatan](https://github.com/ardatan)! - Accept a factory function to `cache` that takes
the context and returns the cache implementation

## 6.1.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/response-cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@envelop/response-cache",
"version": "6.1.2",
"version": "6.2.0",
"type": "module",
"repository": {
"type": "git",
Expand Down