Skip to content

Commit 8805da9

Browse files
authored
Merge pull request #170 from aave/chore/update-schema
chore: update to fixed DecimalNumberWithChange
2 parents a19aac1 + 9aa3438 commit 8805da9

File tree

7 files changed

+43
-34
lines changed

7 files changed

+43
-34
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@aave/graphql": patch
3+
"@aave/client": patch
4+
"@aave/react": patch
5+
---
6+
7+
**fix:** updates `DecimalNumeberWithChange#change` to be `PercentNumber` and not `DecimalNumber`

.github/workflows/pull-request.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ concurrency:
99
cancel-in-progress: true
1010

1111
jobs:
12-
# changeset:
13-
# name: Changeset
14-
# runs-on: ubuntu-latest
15-
# steps:
16-
# - uses: actions/checkout@v4
17-
# with:
18-
# fetch-depth: 0 # important: full history, otherwise no common ancestor
19-
# ref: ${{ github.head_ref || github.ref_name }}
12+
changeset:
13+
name: Changeset
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0 # important: full history, otherwise no common ancestor
19+
ref: ${{ github.head_ref || github.ref_name }}
2020

21-
# - name: Fetch base branch
22-
# shell: bash
23-
# run: |
24-
# git fetch origin ${{ github.base_ref }}:${{ github.base_ref }}
21+
- name: Fetch base branch
22+
shell: bash
23+
run: |
24+
git fetch origin ${{ github.base_ref }}:${{ github.base_ref }}
2525
26-
# - name: Setup Repository
27-
# uses: ./.github/actions/setup
26+
- name: Setup Repository
27+
uses: ./.github/actions/setup
2828

29-
# - name: Ensure Changeset Added
30-
# shell: bash
31-
# run: pnpm changeset status --since=${{ github.base_ref }}
29+
- name: Ensure Changeset Added
30+
shell: bash
31+
run: pnpm changeset status --since=${{ github.base_ref }}
3232

3333
verify:
3434
name: Verify

packages/graphql/schema.graphql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ type DecimalNumber {
236236

237237
type DecimalNumberWithChange {
238238
current: DecimalNumber!
239-
change(window: TimeWindow! = LAST_DAY): DecimalNumber!
239+
change(window: TimeWindow! = LAST_DAY): PercentNumber!
240240
}
241241

242242
type DomainData {
@@ -678,6 +678,7 @@ enum OperationType {
678678
SPOKE_SET_USER_USING_AS_COLLATERAL
679679
SPOKE_SET_USER_POSITION_MANAGER
680680
RENOUNCE_SPOKE_USER_POSITION_MANAGER
681+
LIQUIDATION
681682
}
682683

683684
enum OrderDirection {

packages/graphql/src/enums.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export enum OperationType {
3838
SpokeSetUserUsingAsCollateral = 'SPOKE_SET_USER_USING_AS_COLLATERAL',
3939
SpokeSetUserPositionManager = 'SPOKE_SET_USER_POSITION_MANAGER',
4040
RenounceSpokeUserPositionManager = 'RENOUNCE_SPOKE_USER_POSITION_MANAGER',
41+
Liquidation = 'LIQUIDATION',
4142
}
4243

4344
/**

packages/graphql/src/fragments/common.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,33 @@ export const DecimalNumberFragment =
1010
}`);
1111
export type DecimalNumber = FragmentOf<typeof DecimalNumberFragment>;
1212

13+
export const PercentNumberFragment = graphql(
14+
`fragment PercentNumber on PercentNumber {
15+
__typename
16+
onChainValue
17+
decimals
18+
value
19+
normalized
20+
}`,
21+
);
22+
export type PercentNumber = FragmentOf<typeof PercentNumberFragment>;
23+
1324
export const DecimalNumberWithChangeFragment = graphql(
1425
`fragment DecimalNumberWithChange on DecimalNumberWithChange {
1526
__typename
1627
current {
1728
...DecimalNumber
1829
}
1930
change(window: $timeWindow) {
20-
...DecimalNumber
31+
...PercentNumber
2132
}
2233
}`,
23-
[DecimalNumberFragment],
34+
[DecimalNumberFragment, PercentNumberFragment],
2435
);
2536
export type DecimalNumberWithChange = FragmentOf<
2637
typeof DecimalNumberWithChangeFragment
2738
>;
2839

29-
export const PercentNumberFragment = graphql(
30-
`fragment PercentNumber on PercentNumber {
31-
__typename
32-
onChainValue
33-
decimals
34-
value
35-
normalized
36-
}`,
37-
);
38-
export type PercentNumber = FragmentOf<typeof PercentNumberFragment>;
39-
4040
export const FiatAmountFragment = graphql(
4141
`fragment FiatAmount on FiatAmount {
4242
__typename

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export type introspection_types = {
4444
'Cursor': unknown;
4545
'DateTime': unknown;
4646
'DecimalNumber': { kind: 'OBJECT'; name: 'DecimalNumber'; fields: { 'decimals': { name: 'decimals'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; } }; 'onChainValue': { name: 'onChainValue'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigInt'; ofType: null; }; } }; 'value': { name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'BigDecimal'; ofType: null; }; } }; }; };
47-
'DecimalNumberWithChange': { kind: 'OBJECT'; name: 'DecimalNumberWithChange'; fields: { 'change': { name: 'change'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DecimalNumber'; ofType: null; }; } }; 'current': { name: 'current'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DecimalNumber'; ofType: null; }; } }; }; };
47+
'DecimalNumberWithChange': { kind: 'OBJECT'; name: 'DecimalNumberWithChange'; fields: { 'change': { name: 'change'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PercentNumber'; ofType: null; }; } }; 'current': { name: 'current'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DecimalNumber'; ofType: null; }; } }; }; };
4848
'DomainData': { kind: 'OBJECT'; name: 'DomainData'; fields: { 'chainId': { name: 'chainId'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'ChainId'; ofType: null; }; } }; 'name': { name: 'name'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; 'verifyingContract': { name: 'verifyingContract'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'EvmAddress'; ofType: null; }; } }; 'version': { name: 'version'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'String'; ofType: null; }; } }; }; };
4949
'ERC20PermitSignature': { kind: 'INPUT_OBJECT'; name: 'ERC20PermitSignature'; isOneOf: false; inputFields: [{ name: 'value'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Signature'; ofType: null; }; }; defaultValue: null }, { name: 'deadline'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Int'; ofType: null; }; }; defaultValue: null }]; };
5050
'Erc20Amount': { kind: 'OBJECT'; name: 'Erc20Amount'; fields: { 'amount': { name: 'amount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DecimalNumber'; ofType: null; }; } }; 'fiatAmount': { name: 'fiatAmount'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'FiatAmount'; ofType: null; }; } }; 'fiatRate': { name: 'fiatRate'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'DecimalNumber'; ofType: null; }; } }; 'isWrappedNative': { name: 'isWrappedNative'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'SCALAR'; name: 'Boolean'; ofType: null; }; } }; 'token': { name: 'token'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Erc20Token'; ofType: null; }; } }; }; };
@@ -97,7 +97,7 @@ export type introspection_types = {
9797
'NativeToken': { kind: 'OBJECT'; name: 'NativeToken'; fields: { 'chain': { name: 'chain'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'Chain'; ofType: null; }; } }; 'info': { name: 'info'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'TokenInfo'; ofType: null; }; } }; }; };
9898
'OnChainHubAssetId': unknown;
9999
'OnChainReserveId': unknown;
100-
'OperationType': { name: 'OperationType'; enumValues: 'SPOKE_BORROW' | 'SPOKE_REPAY' | 'SPOKE_SUPPLY' | 'SPOKE_WITHDRAW' | 'SPOKE_UPDATE_USER_RISK_PREMIUM' | 'SPOKE_SET_USER_USING_AS_COLLATERAL' | 'SPOKE_SET_USER_POSITION_MANAGER' | 'RENOUNCE_SPOKE_USER_POSITION_MANAGER'; };
100+
'OperationType': { name: 'OperationType'; enumValues: 'SPOKE_BORROW' | 'SPOKE_REPAY' | 'SPOKE_SUPPLY' | 'SPOKE_WITHDRAW' | 'SPOKE_UPDATE_USER_RISK_PREMIUM' | 'SPOKE_SET_USER_USING_AS_COLLATERAL' | 'SPOKE_SET_USER_POSITION_MANAGER' | 'RENOUNCE_SPOKE_USER_POSITION_MANAGER' | 'LIQUIDATION'; };
101101
'OrderDirection': { name: 'OrderDirection'; enumValues: 'ASC' | 'DESC'; };
102102
'PageSize': { name: 'PageSize'; enumValues: 'TEN' | 'FIFTY'; };
103103
'PaginatedActivitiesResult': { kind: 'OBJECT'; name: 'PaginatedActivitiesResult'; fields: { 'items': { name: 'items'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'LIST'; name: never; ofType: { kind: 'NON_NULL'; name: never; ofType: { kind: 'UNION'; name: 'ActivityItem'; ofType: null; }; }; }; } }; 'pageInfo': { name: 'pageInfo'; type: { kind: 'NON_NULL'; name: never; ofType: { kind: 'OBJECT'; name: 'PaginatedResultInfo'; ofType: null; }; } }; }; };

packages/graphql/src/schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@
773773
"kind": "NON_NULL",
774774
"ofType": {
775775
"kind": "OBJECT",
776-
"name": "DecimalNumber",
776+
"name": "PercentNumber",
777777
"ofType": null
778778
}
779779
},

0 commit comments

Comments
 (0)