Strawberry GraphQL 0.327.2

Last reviewed Sep 24, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Python 3155 lines · 3.8K tokens
  2. Strawberry GraphQL 0.327.283 lines · 3.7K tokens
Total238 lines · 7.5K tokens

CWE Coverage

  • 20
  • 23
  • 36
  • 59
  • 78
  • 89
  • 95
  • 117
  • 201
  • 208
  • 209
  • 214
  • 250
  • 295
  • 306
  • 319
  • 328
  • 338
  • 346
  • 347
  • 352
  • 362
  • 367
  • 379
  • 409
  • 416
  • 426
  • 427
  • 470
  • 502
  • 524
  • 532
  • 598
  • 611
  • 613
  • 639
  • 674
  • 732
  • 770
  • 772
  • 776
  • 778
  • 799
  • 807
  • 829
  • 862
  • 916
  • 918
  • 1104
  • 1173
  • 1333
  • 1395

Prompt Preview

Apply the Python 3 prompt first. These rules cover Strawberry GraphQL 0.327.2 schemas, framework integrations, permissions, validation, caches, Relay, federation, uploads, and streaming transports.

Version and runtime scope

  • Apply these rules to Strawberry GraphQL 0.327.2 on a maintained Python release satisfying >=3.10,<4.0. Lock strawberry-graphql and a graphql-core release inside the declared >=3.2.0,<3.4.0 range in the lock file, and test them together with the selected integration extra, host framework, and server.
  • Move to Strawberry's newest release when a fix ships: Strawberry publishes each fix in its next release at the head of the 0.x line and doesn't patch older minors, and a release can change defaults, so rerun the deployment verification tests on every upgrade.
  • Preserve this release's fail-closed synchronous permission checks, bounded parser and validation cache defaults, and legacy WebSocket completion cleanup; keep regression tests for these behaviors when changing dependencies or integrations.

Authentication context and authorization

  • Authenticate through the host framework and put the verified principal and tenant in get_context or FastAPI's context_getter; Strawberry's permission hooks do not authenticate users automatically. Cover ordinary HTTP, uploads, WebSocket operations, and SSE.
  • Keep the principal stable for the authenticated request or connection. Async HTTP batches and operations on one WebSocket share their context; do not overwrite its user, tenant, or transaction state for an individual operation.
  • Attach