Skip to content

The TenantType in GraphQL is missing the contacts property #18949

@YiPrograms

Description

@YiPrograms

Deployment Type

Self-hosted

NetBox Version

v4.2.5

Python Version

3.10

Steps to Reproduce

  1. Create a tenant (assuming ID 1)
  2. Create a contact (assuming with name "John")
  3. Add a contact assignment to the tenant
  4. Execute the GraphQL query:
query {
  tenant(id: 1) {
    contacts {
      contact {
        name
      }
    }
  }
}

Expected Behavior

Query returns:

{
  "data": {
    "tenant": {
      "contacts": [
        {
          "contact": {
            "name": "John"
          }
        }
      ]
    }
  }
}

Observed Behavior

Query returns contacts on TenantType does not exist:

{
  "data": null,
  "errors": [
    {
      "message": "Cannot query field 'contacts' on type 'TenantType'. Did you mean 'comments'?",
      "locations": [
        {
          "line": 3,
          "column": 5
        }
      ]
    }
  ]
}

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtopic: GraphQLtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions