You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove info from ExecutionParams and add operationType (#3166)
* Remove info from ExecutionParams and add operationType
* Fix tests
* Allow getBatchingExecutor to cache executor by memoizing default executor
* Memoize for a single so allow to memoize correctly.
* Rename Request to ExecutionRequest
* Remove unnecessary diff
* Remove unnecessary operationName from DelegationContext
* Add `context` in `createRequest` and `createRequestInfo` instead of `delegateToSchema`
* Get context from request
* Do not export extra types from delegate
* Add info back
* Fix typings
- Drop unnecessary `GraphQLResolveInfo` in `ExecutionRequest`
13
+
- Add required `operationType: OperationTypeNode` field in `ExecutionRequest`
14
+
- Add `context` in `createRequest` and `createRequestInfo` instead of `delegateToSchema`
15
+
16
+
> It doesn't rely on info.operation.operationType to allow the user to call an operation from different root type.
17
+
And it doesn't call getOperationAST again and again to get operation type from the document/operation because we have it in Request and ExecutionParams
- Memoize `defaultExecutor` for a single `GraphQLSchema` so allow `getBatchingExecutor` to memoize `batchingExecutor` correctly.
22
+
- And there is no different `defaultExecutor` is created for `subscription` and other operation types. Only one executor is used.
23
+
24
+
> Batch executor is memoized by `executor` reference but `createDefaultExecutor` didn't memoize the default executor so this memoization wasn't working correctly on `batch-execute` side.
0 commit comments