@graphql-hive/gateway-runtime 2.0.0 → 2.0.1-alpha-5753e4aaf4c9bc2ec42e0f24e03c6244d8872ea7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @graphql-hive/gateway-runtime
|
|
2
2
|
|
|
3
|
+
## 2.0.1-alpha-5753e4aaf4c9bc2ec42e0f24e03c6244d8872ea7
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#1439](https://github.com/graphql-hive/gateway/pull/1439) [`876f055`](https://github.com/graphql-hive/gateway/commit/876f0553b857c001a3695dff8502e9b4e7a9e46f) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Generic authentication options inherit the supplied context generic
|
|
9
|
+
|
|
10
|
+
- Updated dependencies []:
|
|
11
|
+
- @graphql-mesh/hmac-upstream-signature@2.0.0
|
|
12
|
+
|
|
3
13
|
## 2.0.0
|
|
4
14
|
### Major Changes
|
|
5
15
|
|
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { OperationTypeNode, FieldNode, TypeInfo, GraphQLNamedOutputType, GraphQL
|
|
|
3
3
|
import { Plugin, YogaInitialContext, Instrumentation as Instrumentation$1, YogaServerOptions, BatchingOptions, FetchAPI as FetchAPI$1, YogaMaskedErrorOpts, YogaServerInstance } from 'graphql-yoga';
|
|
4
4
|
import { Plugin as Plugin$1 } from '@envelop/core';
|
|
5
5
|
export { withState } from '@envelop/core';
|
|
6
|
-
import {
|
|
6
|
+
import { GenericAuthPluginOptions } from '@envelop/generic-auth';
|
|
7
7
|
export { ResolveUserFn, ValidateUserFn } from '@envelop/generic-auth';
|
|
8
8
|
import { Logger, LogLevel } from '@graphql-hive/logger';
|
|
9
9
|
export * from '@graphql-hive/logger';
|
|
@@ -678,7 +678,7 @@ interface GatewayConfigBase<TContext extends Record<string, any>> {
|
|
|
678
678
|
*
|
|
679
679
|
* @default false
|
|
680
680
|
*/
|
|
681
|
-
disableIntrospection?: DisableIntrospectionOptions
|
|
681
|
+
disableIntrospection?: DisableIntrospectionOptions<TContext>;
|
|
682
682
|
/**
|
|
683
683
|
* CSRF Prevention
|
|
684
684
|
*
|
|
@@ -694,7 +694,9 @@ interface GatewayConfigBase<TContext extends Record<string, any>> {
|
|
|
694
694
|
/**
|
|
695
695
|
* Generic Auth Configuration
|
|
696
696
|
*/
|
|
697
|
-
genericAuth?:
|
|
697
|
+
genericAuth?: GenericAuthPluginOptions<Record<string, any>, // convenient for strict tsconfig environment
|
|
698
|
+
// convenient for strict tsconfig environment
|
|
699
|
+
GatewayContext & TContext>;
|
|
698
700
|
/**
|
|
699
701
|
* HMAC Signature Handling
|
|
700
702
|
*
|
|
@@ -765,9 +767,9 @@ interface GatewayConfigBase<TContext extends Record<string, any>> {
|
|
|
765
767
|
*/
|
|
766
768
|
cookies?: boolean;
|
|
767
769
|
}
|
|
768
|
-
interface DisableIntrospectionOptions {
|
|
770
|
+
interface DisableIntrospectionOptions<TContext extends Record<string, any>> {
|
|
769
771
|
disableIf?: (args: {
|
|
770
|
-
context: GatewayContext;
|
|
772
|
+
context: GatewayContext & TContext;
|
|
771
773
|
params: ValidateFunctionParameters;
|
|
772
774
|
}) => boolean;
|
|
773
775
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { OperationTypeNode, FieldNode, TypeInfo, GraphQLNamedOutputType, GraphQL
|
|
|
3
3
|
import { Plugin, YogaInitialContext, Instrumentation as Instrumentation$1, YogaServerOptions, BatchingOptions, FetchAPI as FetchAPI$1, YogaMaskedErrorOpts, YogaServerInstance } from 'graphql-yoga';
|
|
4
4
|
import { Plugin as Plugin$1 } from '@envelop/core';
|
|
5
5
|
export { withState } from '@envelop/core';
|
|
6
|
-
import {
|
|
6
|
+
import { GenericAuthPluginOptions } from '@envelop/generic-auth';
|
|
7
7
|
export { ResolveUserFn, ValidateUserFn } from '@envelop/generic-auth';
|
|
8
8
|
import { Logger, LogLevel } from '@graphql-hive/logger';
|
|
9
9
|
export * from '@graphql-hive/logger';
|
|
@@ -678,7 +678,7 @@ interface GatewayConfigBase<TContext extends Record<string, any>> {
|
|
|
678
678
|
*
|
|
679
679
|
* @default false
|
|
680
680
|
*/
|
|
681
|
-
disableIntrospection?: DisableIntrospectionOptions
|
|
681
|
+
disableIntrospection?: DisableIntrospectionOptions<TContext>;
|
|
682
682
|
/**
|
|
683
683
|
* CSRF Prevention
|
|
684
684
|
*
|
|
@@ -694,7 +694,9 @@ interface GatewayConfigBase<TContext extends Record<string, any>> {
|
|
|
694
694
|
/**
|
|
695
695
|
* Generic Auth Configuration
|
|
696
696
|
*/
|
|
697
|
-
genericAuth?:
|
|
697
|
+
genericAuth?: GenericAuthPluginOptions<Record<string, any>, // convenient for strict tsconfig environment
|
|
698
|
+
// convenient for strict tsconfig environment
|
|
699
|
+
GatewayContext & TContext>;
|
|
698
700
|
/**
|
|
699
701
|
* HMAC Signature Handling
|
|
700
702
|
*
|
|
@@ -765,9 +767,9 @@ interface GatewayConfigBase<TContext extends Record<string, any>> {
|
|
|
765
767
|
*/
|
|
766
768
|
cookies?: boolean;
|
|
767
769
|
}
|
|
768
|
-
interface DisableIntrospectionOptions {
|
|
770
|
+
interface DisableIntrospectionOptions<TContext extends Record<string, any>> {
|
|
769
771
|
disableIf?: (args: {
|
|
770
|
-
context: GatewayContext;
|
|
772
|
+
context: GatewayContext & TContext;
|
|
771
773
|
params: ValidateFunctionParameters;
|
|
772
774
|
}) => boolean;
|
|
773
775
|
}
|