fastapi-rest-vs-graphql

A practical FastAPI project showcasing the differences between REST and GraphQL. This project demonstrates how to build parallel APIs over the same dataset using production-level principles like the Repository/Service pattern, Dependency Injection, scope-based authorization and efficient data loading with DataLoaders.

graphqlboilerplatesqlalchemyrest-apipostgresqlstarter-kitapi-designshowdownpydanticfastapifastapi-boilerplatestrawberry-graphql
FreeRepo

Preview

fastapi-rest-vs-graphql preview

Overview

FastAPI REST vs. GraphQL Showdown. A practical demonstration project built with FastAPI to showcase the fundamental differences, strengths and use-cases of two major API paradigms: REST and GraphQL. This application provides identical functionality through both a RESTful API and a GraphQL API, allowing developers to compare how each approach handles data fetching, mutations and client-server interactions.

Features

rest-apigraphql-apirepository-patternservice-layerdependency-injectionscope-based-authorizationdata-loadersbearer-token-authadmin-user-roles

Feature Flags

userDashboardauthenticationblogauthorizationteamsOrgsgraphqlapiDocs

Recommended Use Cases

learning-rest-vs-graphqlapi-design-comparisonproduction-ready-architectureeducational-reference

Frontend

None

Backend

fastapipythonsqlalchemypostgresqlstrawberry-graphqlpydantic

Auth Providers

bearer-token

Deployment Targets

None

Payment Providers

None

Quick Facts

โญ Stars
0
๐Ÿด Forks
0
๐Ÿงพ License
mit
๐Ÿ”„ Active
Unknown

Stack

Framework
fastapi
Language
python
Database
postgresql
Auth
bearer-token
ORM
sqlalchemy

Data Layer

Databases
postgresql
ORM
sqlalchemy

UI Stack

Developer Experience

Docker
No
Tests
No
Quickstart
Yes
env.example
Yes

Pricing

Classification
free
Selected
โ€”
Notes
Open source project under MIT license
Get Started with this Boilerplate