Skip to content
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

Make it possible to add relations to plugin models to GraphQL types #17826

Closed
peteeckel opened this issue Oct 22, 2024 · 3 comments
Closed

Make it possible to add relations to plugin models to GraphQL types #17826

peteeckel opened this issue Oct 22, 2024 · 3 comments
Labels
netbox status: duplicate This issue has already been raised type: feature Introduction of new functionality to the application

Comments

@peteeckel
Copy link
Contributor

NetBox version

v4.1.4

Feature type

New functionality

Triage priority

N/A

Proposed functionality

Currently the relations that can be retrieved with the GraphQL TenantType object type are hard-coded in tenancy/graphql/types.py.

I suggest adding a way to register plugin models with GraphQL so that it's possible to retrieve plugin objects together with tenanty, like this:

query { tenant_list { plugin_object { id } } }

Currently only the opposite direction works:

query { plugin_object_list { tenant { name } } }

Use case

I am maintaining a plugin that supports tenancy for some of its models. It would be useful be able to get a list of plugin objects when querying a tenant.

Database changes

None

External dependencies

No response

@peteeckel peteeckel added status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application labels Oct 22, 2024
@TribuneX
Copy link

This request seems to ask for a similar feature.

@peteeckel
Copy link
Contributor Author

peteeckel commented Oct 22, 2024

Um ... which request? The link is to a user.
[Edit] Found it: #17242

@peteeckel
Copy link
Contributor Author

Apparently yes - didn't find it in my initial search. I'm closing this one.

@peteeckel peteeckel closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2024
@jeremystretch jeremystretch added status: duplicate This issue has already been raised and removed status: needs triage This issue is awaiting triage by a maintainer labels Oct 22, 2024
@jeremystretch jeremystretch added the netbox label Nov 1, 2024 — with Linear
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
netbox status: duplicate This issue has already been raised type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

3 participants