Skip to content

GraphQL: Add filter arguments at all levels #8245

Closed
@ryanmerolle

Description

@ryanmerolle

NetBox version

v3.1.4

Feature type

New functionality

Proposed functionality

Add filter arguments at all levels for GraphQL. Currently, it's only possible to define filter arguments at the top level.

Currently the below is supported:

{
  device_list(site: "MAD1") {
    id
    name
    site{
      name
    }
    interfaces {
      name
    }
  }
  interface_list(name:"eth0", site:"MAD1") {
    name
  }
}

Proposed functionality currently not supported, but common in most GraphQL setups:

{
  device_list(site: "MAD1") {
    id
    name
    site{
      name
    }
    interfaces(name: "eth0") {
      name
    }
  }
}

Use case

Have a more powerful query engine that will be able to return only the desired results by supporting GraphQL filter functionality commonly found in other deployments.

Database changes

None

External dependencies

None

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions