Conversation
WalkthroughThe changes update GraphQL query strings in both order and position subgraph query files to include the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant SDK
participant Subgraph
Client->>SDK: fetchOrdersByUser / fetchOrdersById
SDK->>Subgraph: GraphQL query (includes snapshotCollateralValueUsd)
Subgraph-->>SDK: Orders data with snapshotCollateralValueUsd
SDK-->>Client: Orders data with snapshotCollateralValueUsd
Client->>SDK: fetchPositionsBy* (various)
SDK->>Subgraph: GraphQL query (includes snapshotCollateralValueUsd)
Subgraph-->>SDK: Positions data with snapshotCollateralValueUsd
SDK-->>Client: Positions data with snapshotCollateralValueUsd
Possibly related PRs
Suggested reviewers
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. ✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/subgraph/orders/subgraphQueries.ts (1)
107-107: IncludesnapshotCollateralValueUsdin single-order query.
Consistently fetchingsnapshotCollateralValueUsdfor individual order queries. Don’t forget to regenerate or update any GraphQL codegen/type definitions to include this field.src/subgraph/positions/subgraphQueries.ts (1)
51-51: AddsnapshotCollateralValueUsdacross all positions queries.
The new field is now uniformly requested in each positions-related GraphQL query. Verify that:
- The subgraph schema exposes
snapshotCollateralValueUsdfor position entities.- Any GraphQL codegen or TypeScript interfaces are regenerated/updated.
- Downstream data mappings (UI, analytics, etc.) handle the additional field gracefully.
Also applies to: 110-110, 168-168, 222-222, 259-259, 334-334, 402-402, 452-452, 533-533, 599-599
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (3)
package.json(1 hunks)src/subgraph/orders/subgraphQueries.ts(2 hunks)src/subgraph/positions/subgraphQueries.ts(10 hunks)
🔇 Additional comments (2)
package.json (1)
3-3: Bump SDK version to reflect new GraphQL field addition.
The package version has been incremented to 2.2.21, aligning with the subgraph query updates that includesnapshotCollateralValueUsd. Ensure the changelog is updated and the release pipeline is triggered.src/subgraph/orders/subgraphQueries.ts (1)
47-47: IncludesnapshotCollateralValueUsdin orders-by-user query.
Adding this field ensures collateral values are retrieved with each order. Please confirm the subgraph schema supportssnapshotCollateralValueUsdand that downstream consumers (e.g., TypeScript types or UI components) handle the new field.
Summary by CodeRabbit
New Features
Chores