Closed ryanmerolle closed 2 years ago
Unfortunately it looks like it is not supported as is with graphen-django
This looks like a valid approach: https://stackoverflow.com/questions/56146966/is-there-a-way-to-get-graphene-to-work-with-django-genericrelation-field/69482585#69482585
Unfortunately it looks like it is not supported as is with graphene-django
Given that graphene-django is no longer maintained, we'll likely be moving to an alternate implementation in a future release anyway.
Blocked by #9856
Using a UnionType looks like the preferred method - The Graphene docs has it in their test cases but not very clear, this https://wagtail.org/blog/graphql-with-streamfield/ is a fairly good example. Will implement with this pattern.
NetBox version
v3.3-beta
Feature type
Change to existing functionality
Proposed functionality
As an example, currently you can only query:
and it returns:
Where the rest api allows you to query the same model and get the assigned_object back:
It would be ideal that all usage of any assigned_object/assigned_object_type approach would update the graphql api to return the assigned_object.
Use case
rest and graphql feature parity.
Database changes
No response
External dependencies
No response