DocsGraphQL
GraphQL API
Full GraphQL support with automatic schema generation from your PostgreSQL database.
Endpoints
POST /graphqlExecute GraphQL queries and mutations
GET /graphqlGraphQL Playground (interactive IDE)
GET /admin/graphqlGraphQL 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
| Operator | Description |
|---|---|
| eq | Equals |
| neq | Not equals |
| gt / gte | Greater than / or equal |
| lt / lte | Less than / or equal |
| like / ilike | Pattern match (case sensitive/insensitive) |
| in | In list of values |
| isNull | Is 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 } }"
}'