DocsGraphQL

GraphQL API

Full GraphQL support with automatic schema generation from your PostgreSQL database.

Endpoints

POST /graphql

Execute GraphQL queries and mutations

GET /graphql

GraphQL Playground (interactive IDE)

GET /admin/graphql

GraphQL Playground (admin UI)

Queries

GraphQL
# Basic query
query {
  users {
    id
    name
    email
  }
}

# With filtering and pagination
query {
  users(
    filter: { status: { eq: "active" } }
    limit: 10
    offset: 0
    orderBy: { createdAt: DESC }
  ) {
    id
    name
    email
    createdAt
  }
}

# Nested relationships
query {
  orders {
    id
    total
    customer {
      name
      email
    }
    items {
      quantity
      product {
        name
        price
      }
    }
  }
}

Mutations

GraphQL
# Insert
mutation {
  insertUsers(objects: [
    { name: "Alice", email: "alice@example.com" }
  ]) {
    id
    name
    createdAt
  }
}

# Update
mutation {
  updateUsers(
    filter: { id: { eq: 1 } }
    set: { name: "Alice Smith" }
  ) {
    id
    name
  }
}

# Delete
mutation {
  deleteUsers(filter: { id: { eq: 1 } }) {
    id
  }
}

Filter Operators

OperatorDescription
eqEquals
neqNot equals
gt / gteGreater than / or equal
lt / lteLess than / or equal
like / ilikePattern match (case sensitive/insensitive)
inIn list of values
isNullIs null check

Example Request

cURL
curl -X POST http://localhost:3000/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eyJhbGci..." \
  -d '{
    "query": "{ users { id name email } }"
  }'