Allowing extension of Strawberry Graphql using plugins #10130

Closed
opened 2025-12-29 21:27:14 +01:00 by adam · 5 comments
Owner

Originally created by @129828 on GitHub (Aug 22, 2024).

NetBox version

v4.0.9

Feature type

Change to existing functionality

Proposed functionality

In previous version it was possible to extend the graphql output of existing models in netbox using a plugin. So creating a CMDB model with a OneToOneField to a dcim.device allowed it to be retrievable using either the API or GraphQL.

However, since the switch to Strawberry I cannot find how I can achieve this. There does not seem te be a way to extend existing models to allow for this.

Use case

This change would allow data to be more easily retrieved from netbox using graphql.
While it is possible to do multiple requests and merge them later this goes against the idea behind graphql that you only need 1 request.

Database changes

No response

External dependencies

No response

Originally created by @129828 on GitHub (Aug 22, 2024). ### NetBox version v4.0.9 ### Feature type Change to existing functionality ### Proposed functionality In previous version it was possible to extend the graphql output of existing models in netbox using a plugin. So creating a CMDB model with a OneToOneField to a dcim.device allowed it to be retrievable using either the API or GraphQL. However, since the switch to Strawberry I cannot find how I can achieve this. There does not seem te be a way to extend existing models to allow for this. ### Use case This change would allow data to be more easily retrieved from netbox using graphql. While it is possible to do multiple requests and merge them later this goes against the idea behind graphql that you only need 1 request. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: featurenetbox labels 2025-12-29 21:27:14 +01:00
adam closed this issue 2025-12-29 21:27:15 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 10, 2025):

However, since the switch to Strawberry I cannot find how I can achieve this.

Should this be considered a bug as previously supported behavior has been removed?

@jeremystretch commented on GitHub (Jan 10, 2025): > However, since the switch to Strawberry I cannot find how I can achieve this. Should this be considered a bug as previously supported behavior has been removed?
Author
Owner

@peteeckel commented on GitHub (Jan 10, 2025):

Should this be considered a bug as previously supported behavior has been removed?

I would strongly support that.

@peteeckel commented on GitHub (Jan 10, 2025): > Should this be considered a bug as previously supported behavior has been removed? I would strongly support that.
Author
Owner

@einstux commented on GitHub (Jan 11, 2025):

I agree with the bug designation..

@einstux commented on GitHub (Jan 11, 2025): I agree with the bug designation..
Author
Owner

@jeremystretch commented on GitHub (Jan 13, 2025):

@129828 @peteeckel @sirtux could one of you please resubmit this as a bug report, citing the previously working code and any additional context that would be helpful in restoring the functionality?

@jeremystretch commented on GitHub (Jan 13, 2025): @129828 @peteeckel @sirtux could one of you please resubmit this as a bug report, citing the previously working code and any additional context that would be helpful in restoring the functionality?
Author
Owner

@jeremystretch commented on GitHub (Jan 20, 2025):

Now tracking this as bug #18435.

@jeremystretch commented on GitHub (Jan 20, 2025): Now tracking this as bug #18435.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10130