Add new GraphQL query InfrahubGraphQLQueryReport#9055
Merged
Conversation
This was referenced Apr 25, 2026
76bc2ae to
da5bdd5
Compare
da5bdd5 to
540653c
Compare
ogenstad
commented
Apr 29, 2026
| default_branch: Branch, | ||
| car_person_schema: SchemaBranch, | ||
| ) -> None: | ||
| assert UNIQUE_TARGETS_TEST_CASES, "No test cases defined for unique targets test" |
Contributor
Author
There was a problem hiding this comment.
The reason we have this here is to avoid test setups between each test case.
|
|
||
|
|
||
| async def resolve_graphql_query_report( | ||
| _root: None, |
Contributor
Author
There was a problem hiding this comment.
Note I tried a different approach here to avoid having to have # noqa: ARG003 comments. This is an argument that Graphene adds that we never and up using. So something we could perhaps transfer to other places as well..
ajtmccarty
approved these changes
Apr 29, 2026
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
New GraphQL query to make it easier for end users to figure out how the GraphQLQueryAnalyzer views a query (for artifact regeneration).
This will later be used by infrahubctl graphql query-report (note that PR works together with this mutation but the PR itself hasn't been reviewed by me it's just some generated code which I'll get back to once this is merged to stable. Then after the next patch release of Infrahub I'll get back to the SDK PR and create some integration tests for it as well and potentially clean up that code. Once that is done I'll also remove the SpecKit files generated here.
What changed
targets_unique_nodeswhich indicates if the query can be used for artifact definitions and able to target a single unique base node. (In the future we can add stuff like models being queried along with attributes and relationships) Perhaps the permissions that would be required to run the query. The types of relationships it traverses, if fragments etc are used and the complexity of the query. But for now it's only a single field.