-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: deepPartial #329
feat: deepPartial #329
Conversation
WalkthroughThe recent updates across various GraphQL files primarily focus on enhancing type specificity and flexibility. By transitioning from Changes
Poem
🌟🐰🎉 Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (30)
- src/gql/heart-monitor/heart-monitor.ts (4 hunks)
- src/gql/mutation/marketing.ts (2 hunks)
- src/gql/query/communityPool.ts (2 hunks)
- src/gql/query/delegations.ts (3 hunks)
- src/gql/query/distributionCommissions.ts (3 hunks)
- src/gql/query/featureFlags.ts (3 hunks)
- src/gql/query/governance.ts (2 hunks)
- src/gql/query/ibc.ts (2 hunks)
- src/gql/query/inflation.ts (2 hunks)
- src/gql/query/markPriceCandles.ts (3 hunks)
- src/gql/query/marketing.ts (2 hunks)
- src/gql/query/oracle.ts (2 hunks)
- src/gql/query/perp.ts (2 hunks)
- src/gql/query/redelegations.ts (3 hunks)
- src/gql/query/spotLpPositions.ts (3 hunks)
- src/gql/query/spotPoolCreated.ts (3 hunks)
- src/gql/query/spotPoolExited.ts (3 hunks)
- src/gql/query/spotPoolJoined.ts (3 hunks)
- src/gql/query/spotPoolSwap.ts (3 hunks)
- src/gql/query/spotPools.ts (3 hunks)
- src/gql/query/stats.ts (2 hunks)
- src/gql/query/unbondings.ts (3 hunks)
- src/gql/query/users.ts (3 hunks)
- src/gql/query/validators.ts (3 hunks)
- src/gql/query/wasm.ts (2 hunks)
- src/gql/subscription/markPriceCandlesSubscription.ts (2 hunks)
- src/gql/subscription/oraclePricesSubscription.ts (3 hunks)
- src/gql/subscription/perpMarketSubscription.ts (2 hunks)
- src/gql/subscription/perpPositionsSubscription.ts (2 hunks)
- src/gql/utils/consts.ts (1 hunks)
Additional comments: 26
src/gql/query/featureFlags.ts (3)
- 8-8: The import of
DeepPartial
is correctly added to support the enhanced type specificity for nested object structures. This aligns with the PR's objective to transition fromPartial
toDeepPartial
for improved type safety.- 17-17: The update of the
fields
parameter type toDeepPartial<GQLFeatureFlags>
in thefeatureFlagsQueryString
function is appropriate. It allows for more detailed type checking of nested structures, which is beneficial for the robustness of the application's type system.- 30-30: Similarly, the update of the
fields
parameter type toDeepPartial<GQLFeatureFlags>
in thefeatureFlags
function is consistent with the PR's objectives and enhances type safety for nested object structures.src/gql/query/distributionCommissions.ts (3)
- 10-10: The import of
DeepPartial
is correctly added to support the enhanced typing system for nested object structures. This aligns with the PR's objective to replacePartial
withDeepPartial
.- 20-20: The change from
Partial<GQLDistributionCommission>
toDeepPartial<GQLDistributionCommission>
for thefields
parameter indistributionCommissionsQueryString
function is correctly implemented. This allows for more detailed and flexible type definitions, especially for nested object structures.- 40-40: Similarly, the update to
DeepPartial<GQLDistributionCommission>
for thefields
parameter in thedistributionCommissions
async function is correctly applied. This modification enhances the typing system's robustness and specificity, aligning with the PR's objectives.src/gql/query/wasm.ts (2)
- 9-9: The import of
DeepPartial
is correctly added, supporting the transition to a more detailed and flexible typing system for nested object structures within thewasm.ts
file.- 20-21: The update to use
DeepPartial
forGqlWasmFields
and within it foruserContracts
is correctly implemented. This change enhances the type specificity and flexibility for handling nested object structures, aligning with the PR's objectives.src/gql/query/oracle.ts (2)
- 12-12: The import of
DeepPartial
is correctly added, supporting the transition to a more detailed and flexible typing system for nested object structures within theoracle.ts
file.- 24-26: The update to use
DeepPartial
forOracleFields
and within it fororaclePrices
andoracles
is correctly implemented. This change enhances the type specificity and flexibility for handling nested object structures, aligning with the PR's objectives.src/gql/query/inflation.ts (2)
- 12-12: The import of
DeepPartial
is correctly added, supporting the transition to a more detailed and flexible typing system for nested object structures within theinflation.ts
file.- 24-26: The update to use
DeepPartial
forInflationFields
and within it fordistributions
andinflations
is correctly implemented. This change enhances the type specificity and flexibility for handling nested object structures, aligning with the PR's objectives.src/gql/query/ibc.ts (2)
- 11-11: The import of
DeepPartial
is correctly added, supporting the transition to a more detailed and flexible typing system for nested object structures within theibc.ts
file.- 23-25: The update to use
DeepPartial
forIbcFields
and within it foribcChannels
andibcTransfers
is correctly implemented. This change enhances the type specificity and flexibility for handling nested object structures, aligning with the PR's objectives.src/gql/query/governance.ts (2)
- 13-13: The import of
DeepPartial
is correctly added, supporting the transition to a more detailed and flexible typing system for nested object structures within thegovernance.ts
file.- 26-29: The update to use
DeepPartial
forGovernanceFields
and within it forgovDeposits
,govProposals
, andgovVotes
is correctly implemented. This change enhances the type specificity and flexibility for handling nested object structures, aligning with the PR's objectives.src/gql/query/marketing.ts (3)
- 3-3: The import of
DeepPartial
is correctly added, supporting the transition to a more detailed and flexible typing system for nested object structures within themarketing.ts
file.- 22-25: The update in
QueryMarketingArgs
to use non-partial types fortwitterUser
,tweets
,likes
, andtasks
fields is noted. This change is not directly related to the use ofDeepPartial
but is part of enhancing the type system's specificity and flexibility.- 32-36: The update to use
DeepPartial
forMarketingFields
and within it fortwitterUser
,tweets
,likes
, andtasks
is correctly implemented. This change enhances the type specificity and flexibility for handling nested object structures, aligning with the PR's objectives.src/gql/query/perp.ts (2)
- 20-20: The import of
DeepPartial
is correctly added, supporting the transition to a more detailed and flexible typing system for nested object structures within theperp.ts
file.- 36-42: The update to use
DeepPartial
forGQLPerpFields
and its properties is correctly implemented. This change enhances the type specificity and flexibility for handling nested object structures, aligning with the PR's objectives.src/gql/query/stats.ts (2)
- 27-27: The import of
DeepPartial
is correctly added, supporting the transition to a more detailed and flexible typing system for nested object structures within thestats.ts
file.- 44-51: The update to use
DeepPartial
forGQLStatsFields
and its properties is correctly implemented. This change enhances the type specificity and flexibility for handling nested object structures, aligning with the PR's objectives.src/gql/utils/consts.ts (1)
- 20-40: The
DeepPartial<T>
type is a powerful utility for creating deep partial objects, allowing for more flexible and detailed type definitions, especially for nested structures. This change aligns well with the PR's objective of enhancing type safety and flexibility.Ensure that the implementation of
DeepPartial<T>
is thoroughly tested, particularly for deeply nested structures, to confirm its behavior aligns with expectations.src/gql/heart-monitor/heart-monitor.ts (2)
- 120-208: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [123-266]
The update to use
DeepPartial
for fields in methods of theIHeartMonitor
interface is a significant improvement in type specificity, especially for nested object structures. This change enhances the flexibility and robustness of the type system within the application.Ensure that all consuming code that interacts with these methods is updated accordingly to handle the
DeepPartial
type correctly.
- 305-432: Similar to the
IHeartMonitor
interface, theHeartMonitor
class methods have been updated to useDeepPartial
for fields. This consistency between the interface and the class implementation is crucial for maintaining type safety and flexibility across the application.It's important to verify that the actual implementations of these methods correctly handle the
DeepPartial
type, especially when dealing with nested structures. Consider adding or updating unit tests to cover these scenarios.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* feat: deepPartial (#329) * feat: deepPartial * fix: rem gate * fix: fix barrel * docs(gql): add JSDoc comment for DeepPartial --------- Co-authored-by: Calico Nino <[email protected]> Co-authored-by: Unique Divine <[email protected]>
## [3.3.0](v3.2.0...v3.3.0) (2024-03-06) ### Features * deepPartial ([#329](#329)) ([89f2504](89f2504)) * marketing mutation + query ([#331](#331)) ([61c7fe8](61c7fe8)) ### Bug Fixes * fix barrel ([599041f](599041f)) * merge ([4e1144d](4e1144d)) ### Documentation * **gql:** add JSDoc comment for DeepPartial ([26176e3](26176e3)) [skip ci]
🎉 This PR is included in version 3.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Following was not possible
Summary by CodeRabbit