[PR #15824] [MERGED] 15809 Mark unions as nullable in GraphQL where appropriate #14691

Closed
opened 2025-12-29 23:26:06 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/15824
Author: @arthanson
Created: 4/23/2024
Status: Merged
Merged: 4/25/2024
Merged by: @jeremystretch

Base: featureHead: 15809-graphql-null


📝 Commits (3)

  • c80953f 15809 mark unions as nullable where appropriate
  • fa57c22 15809 fix tests
  • d06d1de 15809 fix tests

📊 Changes

3 files changed (+8 additions, -5 deletions)

View changed files

📝 netbox/dcim/graphql/types.py (+3 -3)
📝 netbox/ipam/graphql/types.py (+2 -2)
📝 netbox/utilities/testing/api.py (+3 -0)

📄 Description

Fixes: #15809

Several of the GraphQL typing for Unions were missing | None to mark that they could return null values. Fixes the test suite as this change was causing them to incorrectly query if the union was optional.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/15824 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 4/23/2024 **Status:** ✅ Merged **Merged:** 4/25/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `15809-graphql-null` --- ### 📝 Commits (3) - [`c80953f`](https://github.com/netbox-community/netbox/commit/c80953fb88fea74ca8c19b130b2168f83babdfb1) 15809 mark unions as nullable where appropriate - [`fa57c22`](https://github.com/netbox-community/netbox/commit/fa57c2229a84febecafbf74bbc79d127b45b312d) 15809 fix tests - [`d06d1de`](https://github.com/netbox-community/netbox/commit/d06d1de0e755eb7c834ca850a69e95922ffdf58f) 15809 fix tests ### 📊 Changes **3 files changed** (+8 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/graphql/types.py` (+3 -3) 📝 `netbox/ipam/graphql/types.py` (+2 -2) 📝 `netbox/utilities/testing/api.py` (+3 -0) </details> ### 📄 Description ### Fixes: #15809 Several of the GraphQL typing for Unions were missing `| None` to mark that they could return null values. Fixes the test suite as this change was causing them to incorrectly query if the union was optional. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:26:06 +01:00
adam closed this issue 2025-12-29 23:26:06 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14691