-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
frontendFrontend developmentFrontend development
Description
概要
サブグラフから送金履歴や分配比率を取得するためのGraphQLクエリを定義し、型を自動生成します。
詳細
- 送金履歴取得クエリの定義
- ユーザー別送金履歴クエリの定義
- 最新の分配比率取得クエリの定義
- 分配比率変更履歴クエリの定義
- graphql-codegenによる型生成
受け入れ基準
-
app/graphql/queries.tsの作成 - 送金履歴取得クエリ定義
- ユーザー送金履歴クエリ定義
- 分配比率取得クエリ定義
-
pnpm codegenで型生成成功 - 生成された型ファイルの確認
クエリ例
// app/graphql/queries.ts
import { gql } from '@apollo/client';
export const GET_TRANSFERS = gql`
query GetTransfers($first: Int!, $skip: Int!) {
transfers(first: $first, skip: $skip, orderBy: timestamp, orderDirection: desc) {
id
from
to
totalAmount
recipientAmount
fundAmount
burnAmount
timestamp
transactionHash
}
}
`;
export const GET_CURRENT_DISTRIBUTION_RATIO = gql`
query GetCurrentDistributionRatio {
distributionRatios(first: 1, orderBy: timestamp, orderDirection: desc) {
id
fundRatio
burnRatio
recipientRatio
timestamp
}
}
`;技術スタック
- GraphQL
- graphql-codegen
- TypeScript
依存関係
- graphql-codegen設定完了後(graphql-codegenの設定 #26)
- Apollo Client設定完了後(Apollo Clientのセットアップ #27)
推定工数
1日
Metadata
Metadata
Assignees
Labels
frontendFrontend developmentFrontend development