WunderGraph
Read post

Don't Let AI Agents Improvise Against Production GraphQL

AI agents should never run arbitrary GraphQL operations against production systems. The recommended pattern is to use an open-world setup in development — full schema introspection and ad-hoc queries — so agents can discover useful operations, then promote those to named, reviewed persisted operations exposed as tools via the Cosmo Router MCP Gateway in production. Five governance rules are outlined: no arbitrary execution in production, no default schema visibility, higher bar for mutations, intention-revealing tool names, and treating the safelist as a public API contract. The safelist bounds the failure surface, enabling rate limits, scopes, and human-approval gates to be applied to a finite set of reviewed operations rather than an open-ended graph.

    #security#ai-agents#graphql#mcp
Jun 10•10m read time•From wundergraph.com
Post cover image
Table of contents
The anti-pattern: production agents with open-ended API accessThe principle: agents should invoke capabilities, not invent themThe pattern: design in an open world, ship in a closed worldRules for production agent accessWhat a safelist does not solveThe takeawayFrequently Asked Questions (FAQ)
8.2K Impressions
WunderGraph's image
WunderGraph

Wundergraph is a blog or publication focused on GraphQL, a query language and runtime for APIs. Thro...

34 Followers

•

437 Upvotes

Would you recommend this post?

Copy link
WhatsApp
Facebook
X
New Squad
  • © 2026 Daily Dev Ltd.
  • Guidelines
  • Explore
  • Tags
  • Sources
  • Squads
  • Leaderboard