Skip to content

fix(codegen): support graphql-core 3.3 - #270

Merged
barbieri merged 1 commit into
masterfrom
fix/graphql-core-33
Oct 30, 2026
Merged

barbieri merged 1 commit into
masterfrom
fix/graphql-core-33

Conversation

@barbieri

@barbieri barbieri commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Why

Allow sgqlc to install alongside graphql-core 3.3 without dropping Python 3.8 or 3.9 support. graphql-core 3.3 returns None for absent field arguments, which broke operation generation.

Closes #269.

Scope

  • Normalize absent field arguments in validation and generated field calls.
  • Allow graphql-core>=3.2.6,<3.4; refresh the lockfile hash without unrelated dependency upgrades.
  • Test graphql-core 3.2.6 and 3.3.1 across the existing Python CI matrix. Exclude Python 3.9 with 3.3.1, which requires Python 3.10+. Give all nine combinations distinct Coveralls flags.
  • Add generated-output regressions for argument-free fields and aliases, with and without schema validation.

Verification

  • Before the fix, all three operation-codegen cases fail with graphql-core 3.3.1. After the fix, the full suite passes with 128 tests and 100% coverage.
  • Full pre-push pre-commit checks pass on Python 3.13 with both dependency versions, including docs, package builds, and GitHub and Shopify example regeneration/imports.
  • Python 3.9 with graphql-core 3.2.6 also passes all 128 tests with 100% coverage.
  • Python 3.8 dependency resolution retains graphql-core 3.2; wheel metadata and all nine CI/Coveralls combinations verified locally.

Blast Radius

The runtime change only affects operation code generation. graphql-core 3.4 remains excluded. Existing Python support and the locked graphql-core 3.2.6 default are unchanged.


Note

Low Risk
Changes are limited to dependency bounds, CI matrix, and defensive handling in operation code generation only.

Overview
Adds graphql-core 3.3 compatibility by widening the dependency to >=3.2.6,<3.4 and updating the lockfile hash.

Operation codegen now treats missing field arguments as empty (node.arguments or ()) when validating required args and emitting field calls, because graphql-core 3.3 returns None instead of an empty sequence for argument-free fields.

CI runs the existing Python matrix against graphql-core 3.2.6 and 3.3.1 (excluding Python 3.9 with 3.3.1), pins the matrix version after poetry install, and updates Coveralls flag names and carryforward list accordingly.

A regression test covers generated output for fields without arguments and aliased fields, with and without schema validation.

Reviewed by Cursor Bugbot for commit 76d42c0. Bugbot is set up for automated code reviews on this repo. Configure here.

Normalize absent field arguments and test graphql-core 3.2.6 and 3.3.1
in CI while preserving older Python support.

AI-assisted implementation and verification with Codex.

Closes: #269
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 40905102525

Coverage remained the same at 100.0%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1695
Covered Lines: 1695
Line Coverage: 100.0%
Coverage Strength: 9.0 hits per line

💛 - Coveralls

@barbieri
barbieri merged commit 9be9b74 into master Oct 30, 2026
11 checks passed
@barbieri
barbieri deleted the fix/graphql-core-33 branch October 30, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

graphql-core 3.3 support

2 participants