Skip to content

src/dazzle_back/graphql/resolver_generator.py

Generated: 2026-03-30T04:38:46.347302+00:00

Commit: 615f1354a103

Language: python

Scope: dazzle_back

Purpose

Resolver Generator - Generate GraphQL resolvers from BackendSpec.

Creates resolvers that delegate to the DNR service layer while enforcing multi-tenant isolation through context.

Key Exports

  • ResolverGenerator
  • generate_resolvers
  • create_query_type
  • create_mutation_type
  • resolve_get
  • resolve_list
  • resolve_create
  • resolve_update
  • resolve_delete

Dependencies

Imports

  • __future__.annotations
  • collections.abc.Callable
  • typing.TYPE_CHECKING
  • typing.Any
  • dazzle_back.graphql.context.GraphQLContext
  • dazzle_back.specs.entity.EntitySpec
  • strawberry
  • dazzle_back.specs.BackendSpec
  • asyncio

Event Interactions

None detected.

Invariants and Assumptions

  • Validates: Failed to create {entity_name}: {e}
  • Validates: No service or repository for {entity_name}
  • Validates: {entity_name} not found
  • Validates: Failed to update {entity_name}: {e}

Tests

  • tests/integration/test_graphql_integration.py
  • tests/unit/test_graphql.py

Notes

This page was automatically generated by tools/gen_reference_docs.py.