graphql/graphql-get-post

Get Post By ID

Retrieve a single post by ID

graphql
post
query

Command

curl -X POST http://localhost:4000/graphql -H 'Content-Type: application/json' -d '{"query":"{ post(id: 1) { id title content author { name } } }"}'

Explanation

Queries a specific post. Useful for detail views or editing content.

Examples

Fetch post ID 10

{ post(id: 10) { title content } }