A minimal FastAPI echo server built with Poetry.
- Python 3.10+
- Poetry
Install dependencies:
poetry installStart the server:
./run.shThe server provides a single GET endpoint at /api/echo that returns the query parameters as JSON.
Examples:
curl "http://localhost:8000/api/echo?foo=bar&test=123"Returns:
{"foo": "bar", "test": "123"}For GraphQL:
curl -X POST http://localhost:8000/graphql -H "Content-Type: application/json" -d '{"query": "{ echo(message: \"Hello GraphQL\") }"}'
curl -X POST http://localhost:8000/graphql -H "Content-Type: application/json" -d '{"query": "{ echo }"}'
curl -X GET "http://localhost:8000/graphql?query=%7B%20echo%20%7D"
curl -X GET "http://localhost:8000/graphql?query=%7B%20echo(message:%20%22Hello%20GET%20GraphQL%22)%20%7D"