Skip to content

Add category field to ComponentType and ComponentTypeInput#613

Open
saditya370 wants to merge 2 commits intomainfrom
feat/component-type-category
Open

Add category field to ComponentType and ComponentTypeInput#613
saditya370 wants to merge 2 commits intomainfrom
feat/component-type-category

Conversation

@saditya370
Copy link
Copy Markdown
Contributor

Summary

  • Adds Category to ComponentTypeInput (write) and ComponentType (read), backing the recently-public category field on componentTypeCreate / componentTypeUpdate and the ComponentType type.
  • Valid values: default, infrastructure, people. Setting infrastructure surfaces the component type in the Infrastructure catalog.
  • Updates the GraphQL selection set and test fixtures.

Test plan

  • go test ./... passes
  • Create/Update mutation tests send category and assert it on the response
  • List test asserts category is populated on all three fixtures

@saditya370 saditya370 self-assigned this Apr 22, 2026
@saditya370 saditya370 requested review from andrewstillv15 and wesleyjellis and removed request for andrewstillv15 April 23, 2026 15:13
Copy link
Copy Markdown
Contributor

@wesleyjellis wesleyjellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 major questions:

  1. How does this work without the feature flag? I'm pretty sure infrastructure component types are gated behind a feature flag, and I'm not sure what happens if you try to make one without the feature flag

  2. Do we need the people category? It looks like we don't let you make people componenttypes inside opslevel, so I think we should drop it from any tests, at least as far as creating them goes... Is that going to cause a problem if you try to manage your componenttypes with Terraform though? ie: terraform tries to delete all the component types it doesn't know about?

@saditya370
Copy link
Copy Markdown
Contributor Author

2 major questions:

  1. How does this work without the feature flag? I'm pretty sure infrastructure component types are gated behind a feature flag, and I'm not sure what happens if you try to make one without the feature flag
  2. Do we need the people category? It looks like we don't let you make people componenttypes inside opslevel, so I think we should drop it from any tests, at least as far as creating them goes... Is that going to cause a problem if you try to manage your componenttypes with Terraform though? ie: terraform tries to delete all the component types it doesn't know about?

Flag: Backend gates category behind infra_component_types_ui on both input and output. Without the flag the field is just absent from the schema, so the SDK sends nothing (omitempty) and reads come back as "". Flagless accounts are unaffected. Added a note to the schema docs + changelog.

people: Dropped. Validator is now ("default", "infrastructure") and the test fixtures don't reference people anymore. No drift risk for existing people-category types — the provider only touches what's in the config, it doesn't enumerate-and-delete unmanaged types. Only edge case is if someone imports a people type into state, which would hit the validator.

@saditya370 saditya370 requested a review from wesleyjellis April 27, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants