feat(incentives): sync schema with V3 backend, add kind discriminator#159
Merged
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f12848333f
ℹ️ 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".
Sync packages/graphql/schema.graphql + graphql-env.d.ts against the V3 backend (PR #210). The backend now exposes a `kind: PointsProgramKind!` field on SupplyPointsIncentive / BorrowPointsIncentive (CAMPAIGN for Merkl-backed programs with live dailyPoints; LOYALTY for fixed-multiplier partner programs). Consumers gate UI on kind instead of probing nullable dailyPoints. Also brings in the rest of the schema delta that's accumulated since the last sync: extended Merit incentive fields, new MerklSupply / MerklBorrow / SupplyPoints / BorrowPoints fragments, canonical userRewards query (supersedes userMeritRewards), RewardId scalar mapping.
c176260 to
7498642
Compare
AGMASO
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Regenerates
packages/graphql/schema.graphqlagainst the V3 backend (localhost:3011) and rerunsgql-tada generate outputsographql-env.d.tsmatches.Backend PR aave/aave-v3-backend#210 splits POINTS programs by Merkl
campaign_idpresence but in an additive way: same__typename(SupplyPointsIncentive/BorrowPointsIncentive), discriminated by a newkind: PointsProgramKind!field (CAMPAIGN|LOYALTY). Forkind = LOYALTY,dailyPoints/pointsPerThousandUsdare always null.Schema delta
enum PointsProgramKind { CAMPAIGN LOYALTY }kind: PointsProgramKind!onSupplyPointsIncentiveandBorrowPointsIncentiveactionKey,rewardTokenAddress,rewardTokenSymbol,customMessage,customForumLink,selfApr), Merkl + Points incentive types, canonicaluserRewardsquery,MeritSavingsGhoIncentive,RewardIdscalar.No removals — verified by diffing the schema SDL produced by backend
mainvs backend PR #210. Change is purely additive at the GraphQL schema level.What this PR contains
packages/graphql/schema.graphql+graphql-env.d.ts: regenerated against local backend on PR #210packages/graphql/src/fragments/reserve.ts: new fragments for Merkl/Points incentives,kindselected in points fragments, extended Merit fragmentspackages/graphql/src/fragments/incentives.ts: new file,MeritSavingsGhoIncentiveFragmentpackages/graphql/src/fragments/index.ts: export the new fragmentpackages/graphql/src/incentives.ts:userRewards+savingsGhoIncentivequeriespackages/graphql/src/graphql.ts:RewardIdscalar mappingpackages/client/src/actions/incentives.ts: client actionspackages/react/src/incentives.ts: react hookpackages/types/src/id.ts:RewardIdbranded type.changeset/incentives-kind-sync.mdTest plan
pnpm install && pnpm -r build✅pnpm lint✅pnpm gql:download:localagainst a fresh backend on PR #210 → no further delta__typenamekeep working unchanged (no new union variants)kindselection to differentiate loyalty vs campaign pointsLinear: https://linear.app/aavelabs/issue/SDK-779
Closes SDK-779