Repository navigation
Merge develop into infrahub-develop - #1584
Merged
Merged
Conversation
…1557) * fix(analyzer): report an operation wrapped in a top-level fragment GraphQLQueryAnalyzer.operations enumerated only the FieldNode children of each operation's top-level selection set, so an operation written inside an inline fragment (`... on Mutation { X }`, `... { X }`) or reached through a fragment spread was skipped. A developer using the analyzer directly got contains_mutation False for a document whose selected operation is a mutation. Resolve inline fragments and fragment spreads when enumerating an operation's fields, mirroring the fix already released in Infrahub's own InfrahubGraphQLQueryAnalyzer. Each fragment is expanded once per operation, so a fragment reached through a cycle or through two spreads neither loops nor contributes its fields twice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(analyzer): hold the hidden-mutation documents in a dataclass The hidden-mutation documents were a list of `pytest.param` strings. Express each as a `HiddenMutationCase`, the dataclass pattern the other SDK test modules use and the shape the backend's shared `hidden_mutation_cases.py` already has, so a case carries its name next to its query and the two suites read side by side. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * test(analyzer): pin the whole operations list of each hidden-mutation case Each case asserted that `TestPersonCreate` appeared among the operations, so a case that also gained or lost an unrelated operation still passed. Carry the expected list in `HiddenMutationCase` and compare `operations` against it, in document order: the multi-operation documents now also pin the `__typename` field of their first operation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
#1569) * fix(utils): extract the fields of an inline fragment nested in another extract_fields read .name on every child of an inline fragment, so a nested inline fragment raised AttributeError. Infrahub calls it through GraphQLQueryAnalyzer.calculate_depth after it runs an operation, and answered such a query with HTTP 500. An inline fragment now contributes the fields that extract_fields returns for its selection set. A fragment spread inside an inline fragment is skipped, as it already was outside one, instead of being reported as a field named after the fragment. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * fix(utils): keep every sub-field of a field selected twice extract_fields merged two selections of the same field with dict.update, which replaced the nested dictionaries of the first selection. For `cars { edges { node { id } } } cars { edges { node { name } } }` only `name` remained under `node`. A field selected first without sub-fields and then with them kept none. The merge now uses deep_merge_dict, so the selections are combined at every level. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
Merge stable into develop
Deploying infrahub-sdk-python with
|
| Latest commit: |
9ea61f8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3e55d657.infrahub-sdk-python.pages.dev |
| Branch Preview URL: | https://develop.infrahub-sdk-python.pages.dev |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## infrahub-develop #1584 +/- ##
====================================================
+ Coverage 88.52% 88.65% +0.13%
====================================================
Files 161 161
Lines 16994 17618 +624
Branches 2286 2447 +161
====================================================
+ Hits 15044 15620 +576
- Misses 1362 1398 +36
- Partials 588 600 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 🚀 New features to boost your workflow:
|
infrahub-github-bot-app
Bot
merged commit Dec 3, 2026
7222734
into
infrahub-develop
57 checks passed
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.
Merging develop into infrahub-develop after merging pull request #1581.