πŸ•ΈοΈ API Patterns and Practices: GraphQL
Chapters Examples Bibliography GitHub β†—
Home / Security
Part 8 2 chapters

Security

Secure the transport, control introspection, and authenticate and authorize at the field level.

Chapter 17

Transport security and introspection control

Serving GraphQL over TLS from framework configuration with generated certificates, each stack's protocol floor, HSTS, public against internal instances, turning off introspection, field suggestions, the IDE and GET, closing the form and text/plain CSRF paths, CORS for one origin, size and token limits, and checking the contract without a public schema.

17 min readRead β†’
Chapter 18

AuthN and AuthZ

Who is asking and what they may see: Keycloak-issued JWTs validated on both stacks, identity in the context and nothing else, operation rules with annotations and permission classes, ownership enforced at one choke point so every path obeys it, a field rule that fails with a code, and 401 for tokens that do not validate.

16 min readRead β†’
← Previous part Performance & Safety Next part β†’ Observability & the Gateway

API Patterns and Practices: GraphQL

Designing GraphQL APIs well, with runnable examples in Quarkus SmallRye GraphQL and Python Strawberry against one canonical SDL contract.

Site

  • Outline
  • Bibliography

Reference

  • GraphQL β†—
  • GraphQL specification β†—
  • SmallRye GraphQL β†—
  • Strawberry β†—
  • View on GitHub β†—
  • Issues β†—
Open source Β· MIT Last built 2026-10-17