@zuplo/graphql 6.60.36 → 6.60.37
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/out/esm/index.js +8 -8
- package/out/esm/index.js.map +1 -1
- package/out/types/index.d.ts +54 -0
- package/package.json +2 -2
package/out/types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InboundPolicyHandler } from "@zuplo/runtime";
|
|
2
|
+
import { OutboundPolicyHandler } from "@zuplo/runtime";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Policy that limits the complexity and depth of GraphQL queries to prevent abuse.
|
|
@@ -161,4 +162,57 @@ export declare const GraphQLDisableIntrospectionInboundPolicy: InboundPolicyHand
|
|
|
161
162
|
*/
|
|
162
163
|
export declare interface GraphqlDisableIntrospectionInboundPolicyOptions {}
|
|
163
164
|
|
|
165
|
+
/**
|
|
166
|
+
* Filters GraphQL introspection responses to exclude specific types and fields.
|
|
167
|
+
*
|
|
168
|
+
* This policy intercepts GraphQL introspection query responses and removes
|
|
169
|
+
* configured types and fields from the schema. Useful for hiding internal
|
|
170
|
+
* types or sensitive fields from the public schema.
|
|
171
|
+
*
|
|
172
|
+
* @title GraphQL Introspection Filter
|
|
173
|
+
* @public
|
|
174
|
+
* @param response - The Response from the upstream
|
|
175
|
+
* @param request - The ZuploRequest
|
|
176
|
+
* @param context - The ZuploContext
|
|
177
|
+
* @param options - The policy options set in policies.json
|
|
178
|
+
* @param policyName - The name of the policy as set in policies.json
|
|
179
|
+
* @returns A Response with filtered introspection data
|
|
180
|
+
* @example
|
|
181
|
+
* ```json
|
|
182
|
+
* {
|
|
183
|
+
* "name": "graphql-introspection-filter",
|
|
184
|
+
* "policyType": "graphql-introspection-filter-outbound",
|
|
185
|
+
* "handler": {
|
|
186
|
+
* "export": "GraphQLIntrospectionFilterOutboundPolicy",
|
|
187
|
+
* "module": "$import(@zuplo/runtime)",
|
|
188
|
+
* "options": {
|
|
189
|
+
* "excludeTypes": ["UserInternal", "AdminType"],
|
|
190
|
+
* "excludeTypeFields": {
|
|
191
|
+
* "User": ["password", "ssn"],
|
|
192
|
+
* "Query": ["adminUsers", "debugInfo"]
|
|
193
|
+
* }
|
|
194
|
+
* }
|
|
195
|
+
* }
|
|
196
|
+
* }
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
export declare const GraphQLIntrospectionFilterOutboundPolicy: OutboundPolicyHandler<GraphQLIntrospectionFilterOutboundPolicyOptions>;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* The options for the GraphQL introspection filtering outbound policy.
|
|
203
|
+
* @public
|
|
204
|
+
*/
|
|
205
|
+
export declare interface GraphQLIntrospectionFilterOutboundPolicyOptions {
|
|
206
|
+
/**
|
|
207
|
+
* GraphQL Types to exclude from the schema (exact match).
|
|
208
|
+
*/
|
|
209
|
+
excludeTypes?: string[];
|
|
210
|
+
/**
|
|
211
|
+
* Fields on specific GraphQL Types to exclude.
|
|
212
|
+
*/
|
|
213
|
+
excludeTypeFields?: {
|
|
214
|
+
[k: string]: string[];
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
|
|
164
218
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zuplo/graphql",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.60.
|
|
4
|
+
"version": "6.60.37",
|
|
5
5
|
"repository": "https://github.com/zuplo/zuplo",
|
|
6
6
|
"author": "Zuplo, Inc.",
|
|
7
7
|
"exports": {
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
"graphql": "^16.8.1"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@zuplo/runtime": "6.60.
|
|
34
|
+
"@zuplo/runtime": "6.60.37"
|
|
35
35
|
}
|
|
36
36
|
}
|