Join our Newsletter — 33% off our NHI Course
Home› FAQ› Architecture & Implementation› How do I stop GraphQL federation from exposing…
Architecture & Implementation

How do I stop GraphQL federation from exposing subgraph helpers?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated November 25, 2026 Domain: Architecture & Implementation

Keep subgraphs behind the router, block direct network reachability, and treat helper fields such as _service and _entities as exposure risks rather than harmless implementation details. Where federation must remain available, combine router mediation with allowlisting and mTLS so only trusted service paths can invoke those mechanisms.

Why GraphQL federation helpers become an exposure problem

In a federated GraphQL setup, helper fields are part of the control plane for composition and entity resolution, not harmless metadata. If subgraphs are directly reachable, those helpers can be queried outside the intended router path and can reveal schema internals, entity references, or implementation clues that were never meant to be public.

The practical question is not whether the helpers are “real” features, but whether they are reachable by untrusted callers. That is why the right baseline is to keep subgraphs private, make the router the only normal entry point, and treat helper exposure as an access-control and trust-boundary issue rather than a documentation issue. The GraphQL Security Guide covers the broader controls that matter around federation, query abuse, and resolver authorisation.

When federation is designed well, helper fields are available only to trusted internal service paths, not to arbitrary clients. If they are exposed directly, they can become a shortcut around schema governance, especially when teams assume that “internal” fields are safe by default. The safer model is to assume every reachable helper is part of the attack surface until routing and network policy prove otherwise.

How to contain helper exposure in a federated API

Containment starts with network topology. Subgraphs should not be broadly addressable from the client side of the environment, and the router should be the enforced mediation point. That keeps helper resolution, composition logic, and schema stitching inside a path you can instrument, authenticate, and restrict.

If direct reachability is unavoidable for operational reasons, put compensating controls around the service-to-service path. Allowlisting reduces which peers can invoke subgraph helpers, while mTLS makes the calling identity and transport path harder to spoof. In practice, those controls should be paired with explicit gateway or router checks so helper fields are only processed when the request came through an expected federation route.

It also helps to separate “can the field exist?” from “can an untrusted caller invoke it?” Federation often fails when teams focus on schema composition but skip the runtime control plane. The GraphQL Federation Security Guide is the most direct reference for router trust, subgraph isolation, and helper-field exposure patterns.

For teams standardising broader API exposure controls, the OWASP API Security Top 10 is a useful external baseline because the same exposure problems often show up as broken authorisation, security misconfiguration, or excessive surface area.

What to check before you assume federation is safe

First, verify whether subgraphs are reachable from anywhere except the router path. If a helper field can be queried from a developer network, shared cluster, test environment, or misrouted ingress, then the exposure problem is already real even if no client has abused it yet. Second, confirm that helper fields are not being treated as implicitly trusted just because they are “internal.”

Then test the enforcement points, not just the architecture diagram. A secure federation design should reject direct calls to subgraphs, require authenticated trusted service paths, and preserve visibility into which component requested a helper resolution. If those checks are missing, the schema may be correct while the runtime remains exposed.

If you are hardening federation alongside identity-aware access paths, the Identity Provider and SSO Security Guide is useful for understanding how trust boundaries and token-bearing service paths should be constrained. Where federation uses service credentials, the NHI Authentication Guide helps frame the mTLS and client-authentication choices that protect machine-to-machine calls.

Risk and Threat Considerations

Helper-field exposure is risky because it can widen the visible surface of a federated graph and give attackers more precise targets for schema probing, entity enumeration, or trust-boundary abuse. In a poorly segmented deployment, a direct subgraph path can also bypass router-level policy, logging, and authorization checks.

Failure mechanism: The federation design leaves subgraphs reachable through direct network paths, or it allows helper fields to execute without proving the request came through the trusted router or an approved service identity.

Impact: Attackers or unauthorized internal callers can discover hidden schema behaviour, query federation internals, and potentially reach data or functions that were intended to be mediated by the router.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP API Security Top 10 addresses the attack surface, NIST SP 800-53 Rev 5 and NIST Zero Trust (SP 800-207) set the technical controls, and ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
OWASP API Security Top 10API5 — Broken Function Level AuthorizationFederation helpers are privileged functions that must be callable only through trusted paths.
Recommendation — Restrict helper execution to authorized federation callers and block direct subgraph access.
NIST SP 800-53 Rev 5AC-4 — Information Flow EnforcementRouter mediation and subgraph isolation are information-flow controls for helper access.
IA-9 — Identification and Authentication (Non-Organizational Users)Trusted service-to-service calls to subgraphs require authenticated machine peers.
Recommendation — Enforce routing policy so only approved paths can invoke subgraph helper functions. Authenticate service callers before permitting any helper-field resolution.
NIST Zero Trust (SP 800-207)Zero Trust ArchitectureFederation should assume no implicit trust between callers, router, and subgraphs.
Recommendation — Apply continuous verification so only explicitly trusted paths can reach subgraphs.
ISO/IEC 27001:2022A.8.20 — Network securityDirect subgraph reachability is a network-security boundary problem.
Recommendation — Segment subgraphs so only approved internal routes can reach them.

Practitioner Guidance

What to verify: Confirm that subgraphs are not routable from client networks and that helper fields are rejected when called outside the federation path. If you cannot prove that with a live test, treat the helper surface as exposed.

Decision rule: If a subgraph must remain reachable for operational reasons, require a trusted caller identity, a constrained allowlist, and transport protection before permitting helper resolution. If any one of those is missing, do not rely on the router alone.

Practitioner takeaway: In federation, the danger is rarely the helper field itself, it is the absence of a strong runtime boundary around who can invoke it and from where.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org