Wartijn / strawberry-wagtail

A plug and play GraphQL API for Wagtail, powered by Strawberry πŸ“

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Strawberry Wagtail 🐦

A plug and play GraphQL API for Wagtail, powered by Strawberry πŸ“

⚠️ Strawberry wagtail is currently experimental, please report any bugs or missing features

Quick start

  1. Install Strawberry Wagtail
pip install strawberry-wagtail
  1. Add strawberry-wagtail to your INSTALLED_APPS:
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",
]
  1. Add the GraphQL view to your urls:
from strawberry_wagtail.views import GraphQLView

from django.urls import path


urlpatterns = [
    path("graphql", GraphQLView.as_view()),
]
  1. Done! You can now try your GraphQL API by going to http://localhost:8000/graphql

About

A plug and play GraphQL API for Wagtail, powered by Strawberry πŸ“

License:MIT License


Languages

Language:Python 66.0%Language:HTML 22.3%Language:CSS 6.9%Language:Dockerfile 4.7%