Capability

GraphQL Deep Inspection

Do not treat GraphQL traffic as a plain POST body — catch introspection, nested DoS and query batching patterns inside your WAAP.

TR7 GraphQL Deep Inspection does not handle GraphQL traffic the same way as REST. A single GraphQL endpoint typically carries multiple operations, nested queries, variables and batched query structures — security controls that stop at URL and method level leave critical risks invisible. TR7 WAAP uses signature-based detection to catch introspection attempts, excessive nested query patterns and query batching behavior. TR7 enriched rules 50100, 50101 and 50102 focus on schema leakage, nested query DoS and batch query abuse respectively. GraphQL controls can run across query, raw, json and form scopes. For endpoints such as `/graphql`, the security policy can be tightened further with method whitelists, allowed JSON key checks, body size limits and custom rules. The result: TR7 makes no claim of a native parser or schema-aware field inspection — but it makes the most common production GraphQL risks (introspection, nested DoS, query batching) visible and manageable inside the WAAP signature engine.

3
TR7 enriched GraphQL rules: 50100 introspection, 50101 nested DoS, 50102 batch
5+
waf_db GraphQL variants: 21360 family and introspection variants
4
Inspection scopes: query, raw, json, form

GraphQL carries too much capability over a single endpoint — classic WAAP logic misses most of it.

In REST traffic, endpoint, method and path usually describe what a request does. In GraphQL, that information lives mostly in the body. The same `/graphql` endpoint can carry reads, writes, nested queries, introspection, fragments and variable-driven operations. A security layer that only checks URL and method cannot see what GraphQL is actually doing.

When GraphQL introspection remains open in production, the application schema can leak. An attacker who learns which types, fields and relationships exist can craft far more targeted queries. This may not be direct data exfiltration, but it is a serious information disclosure that maps the attack surface.

Nested queries and fragments create a different risk. Excessively deep nested queries can impose heavy processing load on the backend with a single HTTP request. Standard rate limiting counts requests — it does not see the cost of a single request. In GraphQL, DoS risk usually comes from query structure, not request volume.

Query batching produces a similar gap. When multiple queries are sent in one body, the traffic looks like a single HTTP request from the outside, but multiple operations may run on the inside. This undermines classic rate-limit and endpoint-based security controls.

TR7 GraphQL Deep Inspection examines GraphQL traffic with pattern-based WAAP rules: introspection, nested-depth DoS and query batching behaviors are detected across query, raw, json and form scopes and tied to production policies.

Our approach

TR7 addresses GraphQL security not by claiming schema awareness, but by bringing the most common production GraphQL abuse patterns into the WAAP signature engine.

Introspection patterns can be blocked in production

TR7 catches introspection indicators such as `__schema`, `__type`, `IntrospectionQuery` and `fragment FullType` using regex-based rules. These rules can run in block mode in production and in monitor mode or at a lower score in staging.

Nested query DoS patterns are scored and caught

Excessively nested GraphQL queries can generate heavy processing load with a single request. The TR7 50101 rule family detects deep `{ ... { ... } }` chains at the pattern level and includes them in the WAAP decision with a high score.

Query batching behavior becomes visible under a single request

Sending multiple queries in one body can undermine classic rate-limit logic. TR7 rule 50102 detects batch query patterns and enables tying that behavior to a log, score or block decision.

Body scope inspection searches for GraphQL payloads across multiple locations

A GraphQL query may be carried not only in the raw body but also in JSON, form or query string fields. TR7 rules run across query, raw, json and form scopes, bringing different client implementations under the same WAAP policy.

Capabilities

GraphQL Deep Inspection manages GraphQL-specific risks with signature-based WAAP rules, scope selection and endpoint hardening controls.

TR7 rule 50100 detects GraphQL introspection attempts

Rule 50100 targets patterns commonly used in GraphQL introspection: `__schema`, `__type`, `IntrospectionQuery` and `fragment FullType`. The default risk level is positioned as a medium-strength signal and can be evaluated at score 4. On endpoints where introspection must be closed in production, this rule can run in block or monitor mode. Schema discovery attempts become visible in the WAAP event stream.

TR7 rule 50101 focuses on nested query DoS patterns

Rule 50101 detects excessively nested GraphQL queries at the pattern level. Deep `{` chains and heavily nested structures can cause a single request to impose high processing cost on the backend. This rule can be evaluated at score 6 as a stronger attack signal. The goal is not to perform schema-aware complexity calculation — it is to catch dangerous nested query patterns early.

TR7 rule 50102 catches query batching abuse

Rule 50102 detects batch patterns where multiple queries are sent in a single body. Because query batching may be legitimate for some clients, the rule's state and score values should be tuned to the application's behavior. Starting in monitor mode and clarifying with real traffic observation is the right approach. Once abuse is confirmed, the rule can be moved to a blocking policy.

waf_db GraphQL variants extend introspection and nested pattern coverage

Alongside TR7 enriched rules, waf_db contains GraphQL variants such as the 50100, 50101 and 21360+ families. These variants cover alternative spellings such as `__schema {`, `__type`, `__typename` and nested mutation patterns. This builds a broader signature surface for introspection and nested query behaviors without relying on a single regex. Operators can override the state and score of these rules per service.

Query, raw, json and form scopes cover different transport formats

GraphQL queries do not always arrive in the same format. Some clients send `query`, `variables` and `operationName` fields inside a JSON body; others may use raw body or form fields. TR7 rules run across query, raw, json and form scopes, bringing these different transport formats into the inspection coverage. This reduces the mistake of trusting only one body format on GraphQL endpoints.

The same rule model applies to both API endpoint and web application targets

GraphQL controls can be applied to both api_endpoint and web_application targets. The same WAAP rule model can be managed with different state, score or scope values depending on service type. For example, introspection can remain in monitor mode on an internal test endpoint while being blocked on a public production endpoint. This flexibility allows a single rule set to be adapted to different environment policies.

StructureRuleDB can narrow GraphQL endpoint behavior

Controls can be defined for the `/graphql` endpoint such as allowing only the POST method, restricting expected JSON keys to `query`, `variables` and `operationName`, or applying a body size limit. These controls do not replace GraphQL signatures — they are a positive security layer that complements them. Unexpected methods or unexpected JSON fields can be rejected at an early stage, making endpoint behavior more predictable.

Custom rules can add application-specific GraphQL patterns

If GraphQL traffic includes application-specific mutation patterns, field names or risky operation names, they can be added as custom WAAP rules. For example, a specific `mutation` keyword or sensitive operation name appearing in the body can be assigned a higher score. These custom rules participate in the main WAAP scoring system and are visible in the log and SIEM stream. Even without schema-aware field inspection, application-specific risks can be caught with pattern-based rules.

Operational depth

GraphQL Deep Inspection is signature-based in its current real capabilities — operation parsing, complexity calculation and schema-aware field WAAP claims are out of scope for this page.

01

Pattern-based inspection

GraphQL controls work with a regex and scope-based pattern detection approach. Operation type differentiation, a real depth counter or query complexity score calculation are not part of this model. This distinction is especially important for accurate positioning.

02

State and score override

Rules 50100, 50101, 50102 and waf_db variants can be set to enabled, monitor or disabled depending on service need. Score values can also be tuned to the application's false-positive tolerance. The right rollout model for production GraphQL endpoints is to start in monitor mode and move to blocking after real traffic observation.

03

Endpoint hardening

Method whitelist, JSON key allow-list and body size limit can be applied on GraphQL endpoints. These controls ensure the request shape conforms to the expected contract alongside signature detection. On public APIs in particular, accepting only the expected format on the `/graphql` endpoint narrows the attack surface.

04

Rate-limit boundary

Per-operation rate-limiting is not applied at the GraphQL parser level. There is no claim of semantically parsing the number of operations inside a single body and applying a separate limit to each. The query batching pattern can be caught as a signature and used alongside general rate-limit policies.

05

Persisted query scope

There is no dedicated support for persisted queries within this capability. GraphQL patterns visible in the request are inspected with WAAP signatures. Resolving a query from its hash and verifying it against schema or registered operation data is not claimed on this page.

06

Non-schema-aware model

Native inspection at the level of a specific GraphQL schema field — for example `User.email` — is not performed. Rules work with a pattern-matching approach against the body. If there are field-specific requirements, they should be addressed in a limited and careful way with a custom regex rule.

When to use it

Blocking introspection on a production GraphQL endpoint

A security team can allow introspection in staging while running rule 50100 in block mode on the production endpoint. Schema discovery attempts are logged, scored and blocked per policy.

Blocking nested fragment DoS attempts with scoring

Excessively nested fragments or query structures can impose high processing cost on the backend. Rule 50101 catches these patterns at score 6, providing a strong signal for the WAAP blocking decision.

Catching a query batching attack on a mobile API

When many queries are attempted in a single request to a mobile client endpoint, rule 50102 detects the batch pattern. The operations team can observe the behavior in monitor mode first and switch to enabled mode once abuse is confirmed.

Method and JSON key whitelist for a GraphQL endpoint

An API team can allow only the POST method and the `query`, `variables` and `operationName` JSON fields on the `/graphql` endpoint. Unexpected methods or fields are rejected before they reach the application, narrowing endpoint behavior.

Frequently asked questions

Is TR7 GraphQL support a native parser or pattern-based?
It is pattern-based. TR7 does not run a dedicated operation parser or schema-awareness engine for GraphQL. Enriched rules 50100, 50101 and 50102 work with regex and scope-based pattern detection. Operation type differentiation, a real depth counter or query complexity calculation are not part of this model. The approach is designed to catch the most common production risks: introspection, nested DoS and query batching.
Can I fully close introspection in production?
Yes. Rule 50100 targets `__schema`, `__type`, `IntrospectionQuery` and `fragment FullType` patterns. It is possible to run this rule in block mode on the production endpoint and in monitor mode on the staging endpoint. Schema discovery attempts become visible in the WAAP event stream and are blocked per policy.
Does query batching detection cause problems for legitimate use?
Query batching can be legitimate for some clients. For this reason, it is recommended to start rule 50102 in monitor mode and observe real traffic behavior rather than activating block mode immediately. Once abuse is confirmed, the rule can be moved to enabled or block policy. State and score values can be overridden per service.
Which scopes do GraphQL rules run across?
TR7 GraphQL rules run across query, raw, json and form scopes. Whether the GraphQL payload is carried in a JSON body, raw body or form fields, the same WAAP signature policy applies. Different client implementations are brought under a single rule set.
What is the difference between waf_db variants and enriched rules?
TR7 enriched rules (50100, 50101, 50102) are positioned as primary rules focused on specific GraphQL abuse patterns. The waf_db variants cover alternative spellings such as `__schema {`, `__typename` and `mutation.*{.*{.*{` as well as additional introspection patterns. Together they build a broader signature surface. Operators can manage both layers independently per service need.
How is GraphQL endpoint hardening done with StructureRuleDB?
With StructureRuleDB, only the POST method can be allowed on the `/graphql` endpoint, expected JSON keys can be restricted to `query`, `variables` and `operationName`, and a body size limit can be applied. These controls do not replace signature detection — they are a positive security layer that ensures requests with unexpected methods or fields are rejected before reaching signature checks.

Connect your GraphQL endpoints to the WAAP signature engine

Make introspection, nested DoS and query batching risks visible and manageable in production. Let's walk through a live setup on your own services.