Skip to content

Commit 331afbd

Browse files
authored
Merge pull request #88 from aave/chore/supports-user-chains
chore: supports new UserChains input type
2 parents 314b558 + 552d6a9 commit 331afbd

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ When updating the GraphQL schema in the SDK:
3131
- **Query-specific types**: colocate with their corresponding query files (permits.ts, transactions.ts, swaps.ts, user.ts, reserve.ts, hub.ts, misc.ts)
3232
- Use pattern: `export type InputName = ReturnType<typeof graphql.scalar<'InputName'>>;`
3333
- Exclude fork-related input types unless explicitly needed
34+
- Ensure for all usage of `ReturnType<typeof graphql.scalar<'<input-name>'>>` there is a corresponding input type in `packages/graphql/src/graphql.ts`
3435

3536
4. **Validate:**
3637
- Use `pnpm check` from `packages/graphql` to check integrity of GraphQL documents

packages/graphql/schema.graphql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,6 +1437,7 @@ type UserBorrowItem {
14371437
input UserBorrowsQueryRequest @oneOf {
14381438
userSpoke: UserSpokeInput
14391439
userPositionId: UserPositionId
1440+
userChains: UserChains
14401441
}
14411442

14421443
input UserBorrowsRequest {
@@ -1451,6 +1452,11 @@ input UserBorrowsRequestOrderBy @oneOf {
14511452
paid: OrderDirection
14521453
}
14531454

1455+
input UserChains {
1456+
user: EvmAddress!
1457+
chainIds: [ChainId!]!
1458+
}
1459+
14541460
input UserHistoryFilter @oneOf {
14551461
spoke: SpokeInput
14561462
chainIds: [ChainId!]
@@ -1594,6 +1600,7 @@ input UserSummaryRequest {
15941600
input UserSuppliesQueryRequest @oneOf {
15951601
userSpoke: UserSpokeInput
15961602
userPositionId: UserPositionId
1603+
userChains: UserChains
15971604
}
15981605

15991606
input UserSuppliesRequest {

packages/graphql/src/graphql-env.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,10 @@ export type introspection_types = {
176176
'UserBalancesRequestFilter': { kind: 'INPUT_OBJECT'; name: 'UserBalancesRequestFilter'; isOneOf: true; inputFields: [{ name: 'chainIds'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; }; }; defaultValue: null }, { name: 'hub'; type: { kind: 'INPUT_OBJECT'; name: 'HubInput'; ofType: null; }; defaultValue: null }, { name: 'spoke'; type: { kind: 'INPUT_OBJECT'; name: 'SpokeInput'; ofType: null; }; defaultValue: null }, { name: 'swappable'; type: { kind: 'INPUT_OBJECT'; name: 'SwappableTokensRequestQuery'; ofType: null; }; defaultValue: null }]; };
177177
'UserBalancesRequestOrderBy': { kind: 'INPUT_OBJECT'; name: 'UserBalancesRequestOrderBy'; isOneOf: true; inputFields: [{ name: 'name'; type: { kind: 'ENUM'; name: 'OrderDirection'; ofType: null; }; defaultValue: null }, { name: 'balance'; type: { kind: 'ENUM'; name: 'OrderDirection'; ofType: null; }; defaultValue: null }]; };
178178
'UserBorrowItem': { kind: 'OBJECT'; name: 'UserBorrowItem'; fields: { 'amount': { name: 'amount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Erc20Amount'; ofType: null; }; } }; 'paid': { name: 'paid'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Erc20Amount'; ofType: null; }; } }; 'reserve': { name: 'reserve'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Reserve'; ofType: null; }; } }; }; };
179-
'UserBorrowsQueryRequest': { kind: 'INPUT_OBJECT'; name: 'UserBorrowsQueryRequest'; isOneOf: true; inputFields: [{ name: 'userSpoke'; type: { kind: 'INPUT_OBJECT'; name: 'UserSpokeInput'; ofType: null; }; defaultValue: null }, { name: 'userPositionId'; type: { kind: 'SCALAR'; name: 'UserPositionId'; ofType: null; }; defaultValue: null }]; };
179+
'UserBorrowsQueryRequest': { kind: 'INPUT_OBJECT'; name: 'UserBorrowsQueryRequest'; isOneOf: true; inputFields: [{ name: 'userSpoke'; type: { kind: 'INPUT_OBJECT'; name: 'UserSpokeInput'; ofType: null; }; defaultValue: null }, { name: 'userPositionId'; type: { kind: 'SCALAR'; name: 'UserPositionId'; ofType: null; }; defaultValue: null }, { name: 'userChains'; type: { kind: 'INPUT_OBJECT'; name: 'UserChains'; ofType: null; }; defaultValue: null }]; };
180180
'UserBorrowsRequest': { kind: 'INPUT_OBJECT'; name: 'UserBorrowsRequest'; isOneOf: false; inputFields: [{ name: 'query'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'UserBorrowsQueryRequest'; ofType: null; }; }; defaultValue: null }, { name: 'orderBy'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'UserBorrowsRequestOrderBy'; ofType: null; }; }; defaultValue: "{name: ASC}" }]; };
181181
'UserBorrowsRequestOrderBy': { kind: 'INPUT_OBJECT'; name: 'UserBorrowsRequestOrderBy'; isOneOf: true; inputFields: [{ name: 'name'; type: { kind: 'ENUM'; name: 'OrderDirection'; ofType: null; }; defaultValue: null }, { name: 'balance'; type: { kind: 'ENUM'; name: 'OrderDirection'; ofType: null; }; defaultValue: null }, { name: 'apy'; type: { kind: 'ENUM'; name: 'OrderDirection'; ofType: null; }; defaultValue: null }, { name: 'paid'; type: { kind: 'ENUM'; name: 'OrderDirection'; ofType: null; }; defaultValue: null }]; };
182+
'UserChains': { kind: 'INPUT_OBJECT'; name: 'UserChains'; isOneOf: false; inputFields: [{ name: 'user'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'chainIds'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; }; }; }; defaultValue: null }]; };
182183
'UserHistoryFilter': { kind: 'INPUT_OBJECT'; name: 'UserHistoryFilter'; isOneOf: true; inputFields: [{ name: 'spoke'; type: { kind: 'INPUT_OBJECT'; name: 'SpokeInput'; ofType: null; }; defaultValue: null }, { name: 'chainIds'; type: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; }; }; defaultValue: null }, { name: 'txHash'; type: { kind: 'INPUT_OBJECT'; name: 'TxHashInput'; ofType: null; }; defaultValue: null }]; };
183184
'UserHistoryItem': { kind: 'UNION'; name: 'UserHistoryItem'; fields: {}; possibleTypes: 'BorrowActivity' | 'LiquidatedActivity' | 'RepayActivity' | 'SupplyActivity' | 'SwapActivity' | 'WithdrawActivity'; };
184185
'UserHistoryRequest': { kind: 'INPUT_OBJECT'; name: 'UserHistoryRequest'; isOneOf: false; inputFields: [{ name: 'user'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'activityTypes'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'ActivityType'; ofType: null; }; }; }; }; defaultValue: "[BORROW, SUPPLY, WITHDRAW, REPAY, SWAP, LIQUIDATED]" }, { name: 'filter'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'UserHistoryFilter'; ofType: null; }; }; defaultValue: null }, { name: 'pageSize'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'PageSize'; ofType: null; }; }; defaultValue: "FIFTY" }, { name: 'cursor'; type: { kind: 'SCALAR'; name: 'Cursor'; ofType: null; }; defaultValue: null }]; };
@@ -194,7 +195,7 @@ export type introspection_types = {
194195
'UserSummaryHistoryItem': { kind: 'OBJECT'; name: 'UserSummaryHistoryItem'; fields: { 'borrows': { name: 'borrows'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FiatAmount'; ofType: null; }; } }; 'date': { name: 'date'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'DateTime'; ofType: null; }; } }; 'healthFactor': { name: 'healthFactor'; type: { kind: 'SCALAR'; name: 'BigDecimal'; ofType: null; } }; 'netBalance': { name: 'netBalance'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FiatAmount'; ofType: null; }; } }; 'supplies': { name: 'supplies'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FiatAmount'; ofType: null; }; } }; }; };
195196
'UserSummaryHistoryRequest': { kind: 'INPUT_OBJECT'; name: 'UserSummaryHistoryRequest'; isOneOf: false; inputFields: [{ name: 'user'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'filter'; type: { kind: 'INPUT_OBJECT'; name: 'UserSummaryFilter'; ofType: null; }; defaultValue: null }, { name: 'window'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'ENUM'; name: 'TimeWindow'; ofType: null; }; }; defaultValue: null }]; };
196197
'UserSummaryRequest': { kind: 'INPUT_OBJECT'; name: 'UserSummaryRequest'; isOneOf: false; inputFields: [{ name: 'user'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; }; defaultValue: null }, { name: 'filter'; type: { kind: 'INPUT_OBJECT'; name: 'UserSummaryFilter'; ofType: null; }; defaultValue: null }]; };
197-
'UserSuppliesQueryRequest': { kind: 'INPUT_OBJECT'; name: 'UserSuppliesQueryRequest'; isOneOf: true; inputFields: [{ name: 'userSpoke'; type: { kind: 'INPUT_OBJECT'; name: 'UserSpokeInput'; ofType: null; }; defaultValue: null }, { name: 'userPositionId'; type: { kind: 'SCALAR'; name: 'UserPositionId'; ofType: null; }; defaultValue: null }]; };
198+
'UserSuppliesQueryRequest': { kind: 'INPUT_OBJECT'; name: 'UserSuppliesQueryRequest'; isOneOf: true; inputFields: [{ name: 'userSpoke'; type: { kind: 'INPUT_OBJECT'; name: 'UserSpokeInput'; ofType: null; }; defaultValue: null }, { name: 'userPositionId'; type: { kind: 'SCALAR'; name: 'UserPositionId'; ofType: null; }; defaultValue: null }, { name: 'userChains'; type: { kind: 'INPUT_OBJECT'; name: 'UserChains'; ofType: null; }; defaultValue: null }]; };
198199
'UserSuppliesRequest': { kind: 'INPUT_OBJECT'; name: 'UserSuppliesRequest'; isOneOf: false; inputFields: [{ name: 'query'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'UserSuppliesQueryRequest'; ofType: null; }; }; defaultValue: null }, { name: 'orderBy'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'INPUT_OBJECT'; name: 'UserSuppliesRequestOrderBy'; ofType: null; }; }; defaultValue: "{name: ASC}" }]; };
199200
'UserSuppliesRequestOrderBy': { kind: 'INPUT_OBJECT'; name: 'UserSuppliesRequestOrderBy'; isOneOf: true; inputFields: [{ name: 'name'; type: { kind: 'ENUM'; name: 'OrderDirection'; ofType: null; }; defaultValue: null }, { name: 'balance'; type: { kind: 'ENUM'; name: 'OrderDirection'; ofType: null; }; defaultValue: null }, { name: 'apy'; type: { kind: 'ENUM'; name: 'OrderDirection'; ofType: null; }; defaultValue: null }, { name: 'earned'; type: { kind: 'ENUM'; name: 'OrderDirection'; ofType: null; }; defaultValue: null }]; };
200201
'UserSupplyItem': { kind: 'OBJECT'; name: 'UserSupplyItem'; fields: { 'amount': { name: 'amount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Erc20Amount'; ofType: null; }; } }; 'earned': { name: 'earned'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Erc20Amount'; ofType: null; }; } }; 'isCollateral': { name: 'isCollateral'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'reserve': { name: 'reserve'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Reserve'; ofType: null; }; } }; }; };

packages/graphql/src/user.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export type UserBalancesRequestOrderBy = ReturnType<
125125
export type UserBorrowsQueryRequest = ReturnType<
126126
typeof graphql.scalar<'UserBorrowsQueryRequest'>
127127
>;
128+
export type UserChains = ReturnType<typeof graphql.scalar<'UserChains'>>;
128129
export type UserBorrowsRequestOrderBy = ReturnType<
129130
typeof graphql.scalar<'UserBorrowsRequestOrderBy'>
130131
>;

0 commit comments

Comments
 (0)