Skip to content

Refactor CIEL Lab concepts query to replace conceptsWithoutTmpMapTermSuggestions #2669

Description

@filiperochalopes

Parent: #2664

Goal

Make concepts the canonical GraphQL entry point for concept search and browsing. Replace the special-purpose conceptsWithoutTmpMapTermSuggestions query with an explicit filter for pending temporary mapping suggestions.

Why

The dedicated query reimplements concept filtering, hydration, and pagination. Its total can diverge from the actual filtered result because it subtracts temporary suggestions outside the base concept filter.

Scope

  • Define an explicit concepts filter for excluding concepts with pending temporary mapping suggestions, including the relevant mapping sources.
  • Move the filtering and count calculation behind the existing concept-query path so pagination and totals are evaluated from the same filtered set.
  • Update Required Class Mappings and any other consumers to use concepts.
  • Deprecate conceptsWithoutTmpMapTermSuggestions for a documented compatibility window, then remove it.
  • Add deterministic tests for pagination, total count, source filters, explicit concept IDs, and no-pending-suggestion cases.

Non-goals

  • Do not add a REST equivalent.
  • Do not change the temporary-map persistence model.
  • Do not alter mapping candidate import/upload workflows.

Acceptance criteria

  • concepts can express the Required Class Mappings eligibility filter.
  • Its items and total are derived from one filtering path.
  • Existing consumer behavior is preserved after migration.
  • The legacy query has a documented deprecation/removal plan.

Related: #2664

Metadata

Metadata

Labels

stage/triagedAI triage complete — scored and classifiedtype/refactorCode restructuring, no behavior change

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions