Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Parse Server | 20,275 | 1,140 | 89 | 17 hours ago | 220 | September 20, 2022 | 405 | apache-2.0 | JavaScript | |
Parse Server for Node.js / Express | ||||||||||
Apollo Server | 13,369 | 5,326 | 1,153 | 2 days ago | 305 | August 26, 2022 | 41 | mit | TypeScript | |
🌍 Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more. | ||||||||||
Graphql Shield | 3,448 | a month ago | 89 | mit | TypeScript | |||||
🛡 A GraphQL tool to ease the creation of permission layer. | ||||||||||
Vulcain | 3,358 | 2 | 4 months ago | 15 | October 14, 2021 | 22 | agpl-3.0 | Go | ||
Fast and idiomatic client-driven REST APIs. | ||||||||||
Strawberry | 3,247 | 17 hours ago | 380 | mit | Python | |||||
A GraphQL library for Python that leverages type annotations 🍓 | ||||||||||
Meatier | 3,115 | 5 years ago | 36 | JavaScript | ||||||
:hamburger: like meteor, but meatier :hamburger: | ||||||||||
Async Graphql | 2,874 | 52 | a day ago | 386 | September 26, 2022 | 104 | apache-2.0 | Rust | ||
A GraphQL server library implemented in Rust | ||||||||||
Ariadne | 2,029 | 10 | 29 | 21 hours ago | 34 | April 22, 2022 | 49 | bsd-3-clause | Python | |
Python library for implementing GraphQL servers using schema-first approach. | ||||||||||
Graphpack | 1,992 | 12 | 1 | 2 years ago | 14 | February 26, 2019 | 34 | mit | JavaScript | |
☄️ A minimalistic zero-config GraphQL server. | ||||||||||
Json Graphql Server | 1,857 | 40 | 5 | a day ago | 21 | August 24, 2022 | 11 | mit | JavaScript | |
Get a full fake GraphQL API with zero coding in less than 30 seconds. |
Python GraphQL library based on dataclasses
The quick start method provides a server and CLI to get going quickly. Install with:
pip install "strawberry-graphql[debug-server]"
Create a file called app.py
with the following code:
import strawberry
@strawberry.type
class User:
name: str
age: int
@strawberry.type
class Query:
@strawberry.field
def user(self) -> User:
return User(name="Patrick", age=100)
schema = strawberry.Schema(query=Query)
This will create a GraphQL schema defining a User
type and a single query
field user
that will return a hardcoded user.
To run the debug server run the following command:
strawberry server app
Open the debug server by clicking on the following link: http://0.0.0.0:8000/graphql
This will open GraphiQL where you can test the API.
Strawberry comes with a mypy plugin that enables statically type-checking your
GraphQL schema. To enable it, add the following lines to your mypy.ini
configuration:
[mypy]
plugins = strawberry.ext.mypy_plugin
A Django view is provided for adding a GraphQL endpoint to your application.
INSTALLED_APPS
.INSTALLED_APPS = [
..., # your other apps
"strawberry.django",
]
urls.py
file.from strawberry.django.views import GraphQLView
from .schema import schema
urlpatterns = [
...,
path("graphql", GraphQLView.as_view(schema=schema)),
]
To support graphql Subscriptions over WebSockets you need to provide a WebSocket enabled server. The debug server can be made to support WebSockets with these commands:
pip install 'strawberry-graphql[debug-server]'
pip install 'uvicorn[standard]'
We use poetry to manage dependencies, to get started follow these steps:
git clone https://github.com/strawberry-graphql/strawberry
cd strawberry
poetry install
poetry run pytest
This will install all the dependencies (including dev ones) and run the tests.
We have a configuration for pre-commit, to add the hook run the following command:
pre-commit install
The code in this project is licensed under MIT license. See LICENSE for more information.