refactor(graphql): inherit analyzer operations from the SDK

Draft
PO
1d ago
+1-40

Why

opsmill/infrahub-sdk-python#1557 adds fragment resolution to GraphQLQueryAnalyzer.operations in the SDK. With that change, InfrahubGraphQLQueryAnalyzer repeats two methods of its base class.

Draft until the SDK pull request merges: python_sdk points at the head of its branch and must then move to the commit on SDK stable.

What changed

  • python_sdk moves from daf2fa02 to e44b1fb9. In infrahub_sdk/, the range changes only analyzer.py.
  • InfrahubGraphQLQueryAnalyzer.operations and _iter_operation_fields are removed. The backend class inherits them from the SDK.
  • operations was a cached_property in the backend and is a plain property in the SDK, so the list is built on each read. The effect on request time is not measured.

How to test

uv run pytest backend/tests/component/graphql/test_query_analyzer.py backend/tests/component/graphql/auth/test_anonymous_checker.py

šŸ¤– Generated with Claude Code