#21714·meshery

[TypeScript Strict] Wave 1.3: Fix TypeScript errors in GraphQL and CodeGen

Author: Bharath314Created Sep 1, 2026Updated Sep 17, 2026
Labelskind/buglanguage/javascriptcomponent/uiframework/react

[!NOTE] WORK IN PROGRESS This issue is currently being drafted or investigated. Content may change frequently, and it is not yet ready for review or assignment. Please do not ask to be assigned.

[TypeScript Strict] Wave 1.3: Fix TypeScript errors in GraphQL and CodeGen

Epic: #21694

Scope: graphql/** Baseline: 5 errors across 2 files

Prerequisites

  • Preceding wave / dependency issues merged to master
  • Latest master branch pulled

Acceptance Criteria

  • All TypeScript strict errors in scope fixed
  • No new any types introduced
  • No @ts-ignore comments (@ts-expect-error permitted only with linked tracking issue)
  • No non-null assertions (!) for null safety — use defensive runtime checks
  • Commits signed with git commit -s

Verification Command

bash
cd ui
# Add graphql/**/*.ts and graphql/**/*.tsx to tsconfig.strict.json include, then:
./node_modules/.bin/tsc -p tsconfig.strict.json --noEmit

Error Breakdown

Error Code Count Description Fix Strategy
TS2322 3 Type incompatibility Ensure type assignments are compatible — may require explicit type annotations or type guards
TS2345 2 Argument type mismatch Update function signatures or call sites to match expected parameter types

Affected Files

  • graphql/lib/data-fetch.ts (3 errors - TS2322)
  • graphql/lib/relayEnvironment.ts (2 errors - TS2345)

Error Details

File: graphql/lib/data-fetch.ts

  • Line 12: Type 'string' is not assignable to type 'string & Location'
  • Line 37: Type 'string' is not assignable to type 'string & Location'
  • Line 45: Type 'string' is not assignable to type 'string & Location'

File: graphql/lib/relayEnvironment.ts

  • Line 36: Argument type mismatch - Promise not assignable to ObservableFromValue
  • Line 44: Argument type mismatch - Promise not assignable to ObservableFromValue

Contributor Guides and Handbook