github →

New request

#20485: Bug: `/settings/ai` throws GraphQL error "Cannot query field icon/universalIdentifier on MarketplaceApp" in v2.2.0

We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.

Issue
sonarly:medium

Bug Description

On /settings/ai, the page throws a GraphQL validation error every time it loads:

Cannot query field "icon" on type "MarketplaceApp".
Cannot query field "universalIdentifier" on type "MarketplaceApp".

Operation name: FindManyMarketplaceAppsForToolTable.

Reproduced on a fresh self-hosted v2.2.0 install (Docker image twentycrm/twenty:v2.2.0). The error is also reproducible on main — the offending code has not been fixed yet.

The error is handled: yes (Apollo error), so the page still renders but the marketplace icons on the tools table are missing/broken.

Root cause

PR #20142 ("Fix application icons", merged 2026-04-30, commit bddd23fd) removed icon from:

  • packages/twenty-server/src/engine/core-modules/application/application-marketplace/dtos/marketplace-app.dto.ts (MarketplaceAppDTO)
  • packages/twenty-front/src/modules/marketplace/graphql/fragments/marketplaceAppFragment.ts (shared MARKETPLACE_APP_FRAGMENT)

universalIdentifier is also not exposed as a @Field on MarketplaceAppDTO — only as an @Args parameter on findOneMarketplaceApp.

But the separate inline query in packages/twenty-front/src/pages/settings/ai/components/SettingsToolsTable.tsx still requests both fields:

const FIND_MANY_MARKETPLACE_APPS_FOR_TOOL_TABLE = gql`
  query FindManyMarketplaceAppsForToolTable {
    findManyMarketplaceApps {
      id
      universalIdentifier   // ❌ not a @Field on MarketplaceApp
      icon                  // ❌ removed in #20142
      logo
    }
  }
`;

The component then reads marketplaceApp.universalIdentifier to build the marketplaceAppByUniversalIdentifier map and passes the full marketplaceApp object into <SettingsToolIcon />, so the join key is broken at runtime even if the GraphQL error is swallowed.

Expected behavior

/settings/ai should load without GraphQL errors, and marketplace app icons should render correctly for tools sourced from marketplace apps.

Technical inputs

Two options:

Option A — restore the fields on MarketplaceAppDTO. If SettingsToolsTable genuinely needs universalIdentifier (to join tools → marketplace app) and icon (for fallback rendering), PR #20142 over-removed and the DTO needs them back.

Option B — rewrite the query. Drop icon (use logo instead, consistent with the rest of #20142) and add universalIdentifier back as a @Field() on MarketplaceAppDTO so the join key is exposed — the value already exists internally in marketplace-query.service.ts (id: registration.universalIdentifier), it just isn't surfaced on the GraphQL type.

Environment

  • Self-hosted Docker, image twentycrm/twenty:v2.2.0
  • Postgres 16.13, Redis 8.x
  • Reproducible on fresh install whenever /settings/ai is opened with at least one marketplace app present
Assessmentadvisory
bug easy95% confidence

The SettingsToolsTable GraphQL query requests icon and universalIdentifier fields that were removed from the MarketplaceApp DTO.

Likely files
  • packages/twenty-front/src/pages/settings/ai/components/SettingsToolsTable.tsx
  • packages/twenty-front/src/modules/marketplace/graphql/fragments/marketplaceAppFragment.ts
  • packages/twenty-server/src/engine/core-modules/application/application-marketplace/dtos/marketplace-app.dto.ts
Create the request

This opens a fresh agent run and a draft PR for issue #20485.

Cancel