Skip to content

bug: Template query fails with "Cannot query field" on nodes with multiple generics #6415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
BeArchiTek opened this issue May 6, 2025 · 0 comments · Fixed by #6423
Closed
Assignees
Labels
priority/1 This issue must be fixed/implemented ASAP, it's a blocker for a release type/bug Something isn't working as expected

Comments

@BeArchiTek
Copy link
Contributor

BeArchiTek commented May 6, 2025

Component

API Server / GraphQL

Infrahub version

1.2.8

Current Behavior

When working with nodes that have more than one generic applied, template queries fail with errors like:

Cannot query field 'serial' on type 'TemplateInfraDevice'
Cannot query field 'status' on type 'TemplateDcimDevice'

This happens even when the attribute being queried is from the same generic as other attributes that are successfully queried.

Expected Behavior

All attributes from all generics applied to a node should be queryable in templates without errors.

Steps to Reproduce

Create a node with multiple generics applied
2. Create a template that queries attributes from these generics
3. Run the template against the node
4. Observe the error "Cannot query field 'xxx' on type 'Templatexxx'"

Additional Information

No response

@BeArchiTek BeArchiTek added the type/bug Something isn't working as expected label May 6, 2025
@exalate-issue-sync exalate-issue-sync bot added the priority/1 This issue must be fixed/implemented ASAP, it's a blocker for a release label May 6, 2025
@exalate-issue-sync exalate-issue-sync bot added state/backlog This issue is part of the backlog state/planned This issue is planned to be worked on in an upcoming release. and removed state/backlog This issue is part of the backlog labels May 6, 2025
@exalate-issue-sync exalate-issue-sync bot removed the state/planned This issue is planned to be worked on in an upcoming release. label May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/1 This issue must be fixed/implemented ASAP, it's a blocker for a release type/bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants