https://github.com/patrick91/strawberry-wagtail
A plug and play GraphQL API for Wagtail, powered by Strawberry 🍓
https://github.com/patrick91/strawberry-wagtail
Last synced: 8 months ago
JSON representation
A plug and play GraphQL API for Wagtail, powered by Strawberry 🍓
- Host: GitHub
- URL: https://github.com/patrick91/strawberry-wagtail
- Owner: patrick91
- License: mit
- Created: 2022-03-25T03:15:34.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-10T10:35:08.000Z (over 3 years ago)
- Last Synced: 2025-01-09T01:32:50.900Z (over 1 year ago)
- Language: Python
- Size: 87.9 KB
- Stars: 33
- Watchers: 5
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Strawberry Wagtail 🐦
A plug and play GraphQL API for Wagtail, powered by
[Strawberry](https://strawberry.rocks) 🍓
> ⚠️ Strawberry wagtail is currently experimental, please report any bugs or
> missing features
## Quick start
1. Install Strawberry Wagtail
```bash
pip install strawberry-wagtail
```
2. Add `strawberry-wagtail` to your `INSTALLED_APPS`:
```python
INSTALLED_APPS = [
"home",
"search",
"wagtail.contrib.forms",
"wagtail.contrib.redirects",
"wagtail.embeds",
"wagtail.sites",
"wagtail.users",
"wagtail.snippets",
"wagtail.documents",
"wagtail.images",
"wagtail.search",
"wagtail.admin",
"wagtail.core",
...,
"strawberry_wagtail",
]
```
3. Add the GraphQL view to your urls:
```python
from strawberry_wagtail.views import GraphQLView
from django.urls import path
urlpatterns = [
path("graphql", GraphQLView.as_view()),
]
```
4. Done! You can now try your GraphQL API by going to
[http://localhost:8000/graphql](http://localhost:8000/graphql)