Books / Authors / Reviews / Users GraphQL API a quick reference and a live tester.
| Method | Path | Body |
|---|---|---|
| POST | /api/auth/signup | { name, email, password } |
| POST | /api/auth/login | { email, password } |
| POST | /api/auth/refresh | uses refresh_token cookie |
| GET | /api/auth/verify | uses access_token cookie |
| POST | /api/auth/logout | clears cookies, revokes current refresh token |
| POST | /api/auth/logout-all | requires auth; revokes every refresh token for the user |
Login/signup set httpOnly access_token and refresh_token cookies.
Once set, every request to this origin (including /graphql) sends them automatically.
books, authors, users, and reviews all use Relay-style
cursor pagination: pass first/after to page forward or
last/before to page backward. Each connection returns edges,
pageInfo, and totalCount.
books, authors, and users also accept a filter
(e.g. titleContains, nameContains, search, createdAfter,
createdBefore) and a required sort input.
Mutations on Book and Review require login and can only be edited/deleted by their
owner. Mutations on Author (createAuthor, updateAuthor,
deleteAuthor) require an ADMIN account — try
admin@example.com / Admin123! if you seeded the database.
Click a sample to load it into the tester below.
// response will appear here