Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions backend/api.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
/**
* @file api.ts
* @description Backend API for prediction market
*
* GraphQL query engine: `src/graphql/`
* - Schema + docs: `src/graphql/typeDefs.ts`, `src/graphql/SCHEMA.md`
* - DataLoaders: `src/graphql/dataloaders.ts`
* - Complexity / rate limits: `src/graphql/complexity.ts`, `src/graphql/rateLimit.ts`
* - Subscriptions (Redis): `src/graphql/pubsub.ts`
* - Mount helper: `mountGraphQL` from `src/graphql`
*
* Wired from `src/index.ts` at `POST /graphql` (subscriptions on `ws:///graphql`).
*/

/**
* Initialize and manage prediction market API endpoints
* TODO: Setup Express/Fastify server
* TODO: Create market endpoints (GET, POST, PUT, DELETE)
* TODO: Implement user authentication and authorization
* TODO: Create bet submission endpoints
* TODO: Add market resolution endpoints
* TODO: Implement dispute handling API
* TODO: Create oracle price feed integration
* TODO: Add websocket for real-time updates
* TODO: Implement pagination for market listings
* TODO: Add filtering and sorting for markets
* TODO: Create balance and portfolio endpoints
* TODO: Add analytics and history endpoints
* TODO: Implement error handling and validation middleware
* TODO: Setup database connection and migrations
* Initialize and manage prediction market API endpoints.
* Prefer `mountGraphQL(app, server)` from `./src/graphql` (used by `src/index.ts`).
*/
export function initializePredictionMarketAPI(): void {
// Blueprint for API initialization
// GraphQL is mounted in src/index.ts via mountGraphQL().
}
5 changes: 5 additions & 0 deletions backend/graphql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# GraphQL Query Engine

Implementation lives in [`../src/graphql/`](../src/graphql/).

See [`../src/graphql/SCHEMA.md`](../src/graphql/SCHEMA.md) for the full schema reference.
178 changes: 161 additions & 17 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading