@zkp2p/indexer-schema
v0.2.3
Published
ZKP2P Indexer GraphQL schema and TypeScript types
Keywords
Readme
@zkp2p/indexer-schema
GraphQL schema and TypeScript types for the ZKP2P indexer. Single source of truth for all downstream consumers (SDK, curator, etc.).
Install
pnpm add @zkp2p/indexer-schemaUsage
TypeScript Types
import { Deposit, Intent, QuoteCandidate, DepositStatus } from '@zkp2p/indexer-schema';
// Or import types only
import type { MethodCurrency, MakerStats } from '@zkp2p/indexer-schema/types';Raw SDL String
import { schemaSDL } from '@zkp2p/indexer-schema';Schema File (for codegen configs)
schema: node_modules/@zkp2p/indexer-schema/dist/schema.graphqlExported Types
Domain entities: Deposit, DepositPaymentMethod, MethodCurrency, Intent, QuoteCandidate, WhitelistEntry, ReferralFeeDistribution
Stats: TakerStats, MakerStats, MakerPlatformStats, MakerCurrencyStats, ManagerStats, ManagerAggregateStats, ManagerDailySnapshot
Rate management: RateManager, RateManagerRate
Price/Profit: PriceSnapshot, MakerProfitSnapshot
Activity: DepositFundActivity, DepositDailySnapshot
Enums: DepositStatus, IntentStatus, PriceSnapshotStatus, ProfitStatus
Breaking Change Detection
The indexer CI runs check-schema-breaking.js on every PR that touches schema/. It fails if any fields, types, or enum values are removed or have incompatible type changes.
When making intentional breaking changes:
- Bump the package version (minor for breaking)
- Update downstream consumers before merging
- The CI check will flag the change — this is expected
Codegen Example
# codegen.yml
schema: node_modules/@zkp2p/indexer-schema/dist/schema.graphql
generates:
src/__generated__/types.ts:
plugins:
- typescript
- typescript-operations