-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
349 additions
and
149 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
Oops, something went wrong.