@zuplo/graphql 5.1575.0 → 5.1577.0
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/index.d.ts +51 -3
- package/index.minified.js +30 -30
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -38,21 +38,69 @@ declare type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
|
|
|
38
38
|
|
|
39
39
|
declare type CorsPolicy = string | "anything-goes" | "none";
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Limits the complexity of a GraphQL query
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* This policy allows you to add a limit for the depth and a limit for the
|
|
46
|
+
* complexity of a GraphQL query.
|
|
47
|
+
*
|
|
48
|
+
* @title GraphQL Complexity Limit
|
|
49
|
+
* @public
|
|
50
|
+
* @param request - The ZuploRequest
|
|
51
|
+
* @param context - The ZuploContext
|
|
52
|
+
* @param options - The policy options set in policies.json
|
|
53
|
+
* @param policyName - The name of the policy as set in policies.json
|
|
54
|
+
* @returns A Request or a Response
|
|
55
|
+
*/
|
|
41
56
|
export declare const GraphQLComplexityLimitInboundPolicy: InboundPolicyHandler<GraphQLComplexityLimitInboundPolicyOptions>;
|
|
42
57
|
|
|
58
|
+
/**
|
|
59
|
+
* The options for this policy
|
|
60
|
+
*/
|
|
43
61
|
export declare interface GraphQLComplexityLimitInboundPolicyOptions {
|
|
44
62
|
useComplexityLimit: {
|
|
45
|
-
|
|
46
|
-
|
|
63
|
+
/**
|
|
64
|
+
* The maximum complexity a query is allowed to have
|
|
65
|
+
*/
|
|
66
|
+
complexityLimit?: number;
|
|
67
|
+
/**
|
|
68
|
+
* The endpoint URL to use for the complexity calculation
|
|
69
|
+
*/
|
|
70
|
+
endpointUrl?: string;
|
|
47
71
|
};
|
|
48
72
|
useDepthLimit: {
|
|
49
|
-
|
|
73
|
+
/**
|
|
74
|
+
* The maximum depth a query is allowed to have
|
|
75
|
+
*/
|
|
76
|
+
depthLimit?: number;
|
|
77
|
+
/**
|
|
78
|
+
* The fields to ignore when calculating the depth of a query
|
|
79
|
+
*/
|
|
50
80
|
ignore?: string[];
|
|
51
81
|
};
|
|
52
82
|
}
|
|
53
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Disables introspection queries on your API. This is useful in production to prevent attackers from learning about your API. You can still keep introspection enabled for any request not going through Zuplo.
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* This policy allows you to disable introspection queries on your API. Any
|
|
89
|
+
* introspection query will be blocked with a `403 Forbidden` response.
|
|
90
|
+
*
|
|
91
|
+
* @title GraphQL Disable Introspection
|
|
92
|
+
* @public
|
|
93
|
+
* @param request - The ZuploRequest
|
|
94
|
+
* @param context - The ZuploContext
|
|
95
|
+
* @param options - The policy options set in policies.json
|
|
96
|
+
* @param policyName - The name of the policy as set in policies.json
|
|
97
|
+
* @returns A Request or a Response
|
|
98
|
+
*/
|
|
54
99
|
export declare const GraphQLDisableIntrospectionInboundPolicy: InboundPolicyHandler<GraphqlDisableIntrospectionInboundPolicyOptions>;
|
|
55
100
|
|
|
101
|
+
/**
|
|
102
|
+
* The options for this policy
|
|
103
|
+
*/
|
|
56
104
|
export declare interface GraphqlDisableIntrospectionInboundPolicyOptions {
|
|
57
105
|
}
|
|
58
106
|
|