-
Notifications
You must be signed in to change notification settings - Fork 561
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore(deps): update dependency vite to v3 (master) (#1444) * chore(deps): update actions/checkout action to v3 (#1431) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency ioredis to v5.2.2 (#1450) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Replace cross-undici-fetch with @whatwg-node/fetch * chore(deps): update dependency vite to v3 * Fix GraphiQL build * Go Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com> * Response Cache plugin * Fixes * chore: upgrade to latest envelop/response-cache * no need to graphql parameters * add docs * white space ok Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Laurin Quast <laurinquast@googlemail.com>
- Loading branch information
1 parent
f325429
commit 5629a5c
Showing
14 changed files
with
620 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
'@graphql-yoga/common': minor | ||
--- | ||
|
||
New `setResult` helper is available in `onRequestParseDone` hook to set `ExecutionResult` before any GraphQL specific process. | ||
|
||
You can check `@graphql-yoga/plugin-response-cache`'s implementation to see how it can be useful. | ||
|
||
Also now `onResultProcess` and `useResultProcessor` hooks use generics to get more type-safety. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
'@graphql-yoga/plugin-response-cache': major | ||
--- | ||
|
||
New Response Cache Plugin!!! | ||
|
||
On top of [`@envelop/response-cache`](https://www.envelop.dev/plugins/use-response-cache), this new plugin allows you to skip execution phase even before all the GraphQL execution phases immediately after the GraphQL request parameters is parsed by Yoga. | ||
|
||
Also it doesn't need to have `documentString` stored in somewhere in order to get it back during the execution to generate the cache key. | ||
|
||
All the features of the same except for the following: | ||
|
||
- `session` factory function takes `GraphQLParams` and `Request` objects instead of GraphQL context as arguments. | ||
|
||
- `type SessionIdFactory = (params: GraphQLParams, request: Request) => Maybe<string>` | ||
|
||
- `enabled` function takes `GraphQLParams` and `Request` objects instead of GraphQL context as arguments. | ||
- `type EnabledFn = (params: GraphQLParams, request: Request) => boolean` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# @graphql-yoga/plugin-response-cache | ||
|
||
For the documentation check `http://graphql-yoga.com/docs/response-cache` |
Oops, something went wrong.