Repository navigation
fix(codegen): support graphql-core 3.3 - #270
Merged
Merged
Conversation
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
Coverage Report for CI Build 40905102525Coverage remained the same at 100.0%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Allow sgqlc to install alongside graphql-core 3.3 without dropping Python 3.8 or 3.9 support. graphql-core 3.3 returns
Nonefor absent field arguments, which broke operation generation.Closes #269.
Scope
graphql-core>=3.2.6,<3.4; refresh the lockfile hash without unrelated dependency upgrades.Verification
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.4and 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 returnsNoneinstead 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.