Skip to content

bug: is_inherited still in GraphQL schema for attribute types, but resolver missing in 1.9.x #12

@polmichel

Description

@polmichel

Component

No response

Infrahub version

1.9.x

Current Behavior

The GraphQL schema (introspection) on Infrahub 1.9.x advertises an is_inherited: Boolean field on AttributeInterface and every concrete attribute type (TextAttribute, Dropdown, NumberAttribute, MacAddress, IPHost, IPNetwork, CheckboxAttribute, String, etc.). At runtime, selecting that field fails with '<AttributeKind>' object has no attribute 'is_inherited'.

Any consumer that generates a typed client from the schema and selects all schema fields hits this on the first non-trivial attribute query (like I do in https://github.com/cyberwitchery/infrahub.rs/). This looks like incomplete cleanup from the deprecation discussed in opsmill#3104: the resolver was removed but the schema definition wasn't.

Expected Behavior

Expected from me, either:

  • the runtime resolves is_inherited correctly, or
  • the field is removed from the schema definition so introspection-driven clients don't generate code that selects it.

Steps to Reproduce

Minimal query against a fresh 1.9.3 instance (default seeding, anonymous access enabled):

{
  CoreAccount {
    edges {
      node {
        name {
          is_inherited
        }
      }
    }
  }
}

Response:

{
  "data": null,
  "errors": [
    {
      "message": "'String' object has no attribute 'is_inherited'",
      "locations": [{ "line": 5, "column": 11 }],
      "path": ["CoreAccount"]
    }
  ]
}

Same failure for Dropdown (e.g. account_type { is_inherited } on CoreAccount) and every other concrete attribute type. Schema introspection still emits 11 occurrences of is_inherited (one on the interface plus 10 implementers).

Additional Information

Tested on 1.9.0 and 1.9.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions