GraphQL Integration
Optional GraphQL support with Pothos for TypeScript-first schemas, GraphQL-JIT for performance, and WebSocket subscriptions for real-time data.
On this page
GraphQL That Just Works
Add GraphQL to your API with one call.
TypeScript-first schemas, WebSocket subscriptions, and 5-10x performance boost included.
It's This Simple
Enable GraphQL with one call
typescript
Why GraphQL Integration Matters
Without proper GraphQL setup, you're manually configuring servers, handling subscriptions, and managing performance. With MoroJS, you get all of that automatically.
Traditional GraphQL setup requires multiple libraries and complex configuration. We handle that automatically.
Without Integration
- •Manual GraphQL server setup
- •No TypeScript-first schemas
- •Manual subscription handling
- •No built-in performance optimization
With MoroJS
- •One-call GraphQL setup
- •Pothos for TypeScript-first schemas
- •Built-in WebSocket subscriptions
- •GraphQL-JIT for 5-10x performance
It's This Easy
Use Pothos for TypeScript-first schemas. Get full type inference automatically.
TypeScript-first with Pothos
typescript
Why It Makes Sense
TypeScript-First
Pothos support for TypeScript-first schemas
Fast
GraphQL-JIT for 5-10x performance boost
Real-time
WebSocket subscriptions for real-time data
Optional
Completely optional - zero dependencies if unused
How It Works
MoroJS provides optional GraphQL support that integrates seamlessly with your existing REST API. You can use standard GraphQL schemas, Pothos for TypeScript-first development, or both. GraphQL-JIT compilation provides significant performance improvements, and WebSocket subscriptions enable real-time features.
Quick Start
Basic GraphQL with Type Definitions
typescript
TypeScript-First with Pothos
typescript
Advanced Features
WebSocket Subscriptions
typescript
Performance with GraphQL-JIT
typescript
DataLoader for Batching (N+1 Prevention)
typescript
Full Configuration
typescript
Installation
Core Features
- Pothos support for TypeScript-first schemas
- GraphQL-JIT for 5-10x performance boost
- WebSocket subscriptions for real-time data
- GraphQL Playground for interactive exploration
- Completely optional - zero dependencies if unused
- DataLoader integration for N+1 prevention