API Overview¶
NextPresser provides a comprehensive API for interacting with your WordPress backend.
GraphQL Queries¶
All data fetching is done through GraphQL queries to your WordPress GraphQL endpoint.
Basic Query Example¶
import { gql } from '@apollo/client';
const GET_POSTS = gql`
query GetPosts {
posts {
nodes {
id
title
content
date
}
}
}
`;
Authentication¶
NextPresser supports multiple authentication methods:
- JWT tokens
- Application passwords
- OAuth 2.0
Rate Limiting¶
API requests are rate-limited to prevent abuse. Default limits:
- 100 requests per minute per IP
- 1000 requests per hour per IP
Error Handling¶
All API errors are handled consistently with proper error messages and status codes.