Codapult
PricingPluginsDocs
Codapult

The SaaS Boilerplate for Builders

Product

  • Pricing
  • Plugins
  • Documentation

Company

  • Contact
  • GitHub

Legal

  • Privacy Policy
  • Terms of Service

© 2026 Codapult. All rights reserved.

All articles

Getting Started

  • Introduction
  • Quick Start
  • Project Structure

Configuration

  • Environment Variables
  • App Configuration

Authentication

  • Authentication
  • OAuth Providers
  • Two-Factor & Passwordless
  • Enterprise SSO (SAML)

Database

  • Database
  • Migrations

Teams

  • Teams & Organizations
  • Permissions & RBAC

Payments

  • Payments & Billing
  • Stripe Setup
  • LemonSqueezy Setup
  • Polar Setup
  • Payment Webhooks

Api

  • API Layer
  • tRPC
  • GraphQL

Ai

  • AI Features

Email

  • Email
  • Email Templates

Infrastructure

  • Infrastructure
  • File Storage
  • Background Jobs

Ui

  • UI & Theming

I18n

  • Internationalization

Content Management

  • Content Management

Admin

  • Admin Panel

Security

  • Security

Monitoring

  • Analytics & Monitoring

Modules

  • Module Architecture

Plugins

  • Plugin System
  • AI Kit Plugin
  • CRM Plugin
  • Helpdesk Plugin
  • Email Marketing Plugin

Deployment

  • Deployment
  • Troubleshooting

Upgrading

  • Upgrading Codapult

Developer Tools

  • MCP Server
  • Testing
Api

GraphQL

Optional GraphQL layer with graphql-yoga, SDL schema, and resolvers.

Codapult includes an optional graphql-yoga server for teams that prefer GraphQL over REST or tRPC. It is an independent module and can be removed without affecting other API layers.

File Structure

PathDescription
src/lib/graphql/schema.tsSDL type definitions
src/lib/graphql/resolvers.tsResolver implementations
src/app/api/graphql/route.tsHTTP endpoint (GET + POST)

Endpoint

The GraphQL endpoint is available at /api/graphql. It supports both GET (for queries via URL params) and POST (standard JSON body) methods.

In development, graphql-yoga serves a built-in GraphiQL playground at the same URL when accessed from a browser.

When to Use GraphQL vs tRPC

Use caseRecommended
Internal frontend ↔ backend communicationtRPC
Public API for third-party consumersGraphQL
Mobile app with varied data requirementsGraphQL
Dashboard with full-stack TypeScripttRPC
Need introspection/schema discoveryGraphQL

Both layers share the same auth primitives (getAppSession) and rate limiting. You can use both simultaneously.

Authentication

The GraphQL route checks auth and applies rate limiting (60 requests per 60 seconds):

const session = await getAppSession();
// session is available in resolver context

Pass the session to resolvers via the context object. Protected resolvers should check ctx.session before returning data.

Removal

GraphQL is an independently removable module. Use the setup wizard:

npx @codapult/cli setup

Or remove manually: delete src/lib/graphql/, src/app/api/graphql/, and uninstall graphql, graphql-yoga, and graphql-tag dependencies.

tRPCAI Features