Skip to content

devixlabs/fastyql-skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastyQL Skeleton

A minimal FastAPI echo server built with Poetry.

Requirements

  • Python 3.10+
  • Poetry

Setup

Install dependencies:

poetry install

Running

Start the server:

./run.sh

Usage

The 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" 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published