Files
arista-evpn-vxlan-clab/infrahub
Damien c3587a1c9c fix: Add direct device relationship to BGPAddressFamily for query filtering (#23)
InfraHub does not support multi-hop relationship traversal in GraphQL
filters, so `bgp_config__device__name__value` fails at query time.
Fix follows the same pattern used for InfraMlagPeerConfig (#22):
add a denormalized direct device relationship to the schema node and
use it in the query filter.

Changes:
- infrahub/schemas/bgp.yml: add `device` relationship (kind: Attribute,
  cardinality: one, optional: false) to BGPAddressFamily as the first
  relationship, before bgp_config
- infrahub/objects/11-bgp-sessions.yml: add `device: ["<device>"]` to
  all 22 InfraBGPAddressFamily entries (spine1×2, spine2×2, leaf1–8×2
  each, plus leaf7 and leaf8 VRF gold AF)
- infrahub/transforms/queries/bgp_intent.gql: change filter from
  `bgp_config__device__name__value` to `device__name__value`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:05:37 +01:00
..