Skip to content

fix: migrate deprecated Morpho API fields#683

Merged
Rubilmax merged 2 commits into
mainfrom
hermes/migrate-deprecated-api-fields-20260518
May 20, 2026
Merged

fix: migrate deprecated Morpho API fields#683
Rubilmax merged 2 commits into
mainfrom
hermes/migrate-deprecated-api-fields-20260518

Conversation

@prd-carapulse
Copy link
Copy Markdown
Contributor

@prd-carapulse prd-carapulse Bot commented May 19, 2026

Summary

  • Migrates GraphQL queries off deprecated Morpho API fields/filters scheduled for removal on 2026-05-20.
  • Uses stable aliases where possible (for example uniqueKey: marketId, whitelisted: listed) so existing runtime response shapes stay unchanged.
  • Updates direct follow-up code only where the replacement field moved (VaultMetadata.curators -> Vault.state.curators, MarketPosition.supplyAssets -> MarketPosition.state.supplyAssets).

Verification

  • Ran schema-aware scan against target GraphQL documents: no listed deprecated output fields or whitelisted/promoted filters remain in this repo.
  • pnpm install --frozen-lockfile --ignore-scripts
  • pnpm --filter @morpho-org/liquidity-sdk-viem build
  • pnpm --filter @morpho-org/liquidation-sdk-viem build

Request Context

  • Initiator: Milan / GitHub: unresolved
  • Initial Slack thread: C0B3BFBE6AK / thread_ts 1779090576.528369
  • Additional context: morpho-org/morpho-apps#2523 already covers the internal consumer app and is intentionally excluded from this PR batch.
  • Rationale: Deprecated Morpho API GraphQL fields are marked for removal on 2026-05-20; migrate repo queries before removal.

View Slack thread

Migrates deprecated Morpho API GraphQL fields/filters before the 2026-05-20 removal.

Requested in Slack thread C0B3BFBE6AK / 1779090576.528369.
@prd-carapulse prd-carapulse Bot requested a review from a team as a code owner May 19, 2026 08:58
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review


P1 Badge Migrate the position filter off marketUniqueKey

The liquidatable-position query still filters with marketUniqueKey_in even though the selected market ID was migrated. The generated schema already has the replacement marketId_in on MarketPositionFilters, so after the deprecated filter is removed, liquidation bots that pass marketIds will get a GraphQL validation error and stop retrieving liquidatable positions.


where: { chainId_in: [$chainId], uniqueKey_in: $marketIds }

P1 Badge Migrate this assets query filter off uniqueKey

getMarketsAssets is still generated with the deprecated uniqueKey_in market filter, so the liquidation path can still fail once the API removes that filter even though the response field was aliased to marketId. This query runs in parallel with the liquidatable positions fetch and an API validation error here rejects the whole liquidation lookup; switch this filter to the current market-id filter and regenerate src/api/sdk.ts.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/liquidity-sdk-viem/graphql/GetMarkets.query.gql
Comment thread packages/liquidity-sdk-viem/graphql/GetMarkets.query.gql
Rubilmax
Rubilmax previously approved these changes May 20, 2026
Add patch changeset entries for the liquidity and liquidation SDK GraphQL market identifier migration.
@milanmorpho
Copy link
Copy Markdown

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Rubilmax Rubilmax merged commit 905726e into main May 20, 2026
36 checks passed
@Rubilmax Rubilmax deleted the hermes/migrate-deprecated-api-fields-20260518 branch May 20, 2026 08:50
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.

3 participants