aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2024-03-31 14:16:52 +0000
committerKai Knoblich <kai@FreeBSD.org>2024-03-31 14:34:36 +0000
commit20ae8fa42c295517d587de9c226cac67397d5a69 (patch)
treebd5951bf125aac72f44e4c60745188e9f30b5444
parent30b5dea292c9429fbe34ebe7477b5a193867bf0c (diff)
www/py-strawberry-graphql-django: New port
This package provides powerful tools to generate GraphQL types, queries, mutations and resolvers from Django models. Supported Features: * GraphQL type generation from models * Filtering, pagination and ordering * Basic create, retrieve, update and delete (CRUD) types and mutations * Basic Django auth support, current user query, login and logout mutations * Django sync and async views * Permission extension using django's permissioning system * Relay support with automatic resolvers generation * Query optimization to improve performance and avoid common pitfalls (e.g n+1) * Debug Toolbar integration with graphiql to display metrics like SQL queries * Unit test integration https://github.com/strawberry-graphql/strawberry-django
-rw-r--r--www/Makefile1
-rw-r--r--www/py-strawberry-graphql-django/Makefile34
-rw-r--r--www/py-strawberry-graphql-django/distinfo3
-rw-r--r--www/py-strawberry-graphql-django/pkg-descr15
4 files changed, 53 insertions, 0 deletions
diff --git a/www/Makefile b/www/Makefile
index 2d6c2f6a1bc9..d688b7b84844 100644
--- a/www/Makefile
+++ b/www/Makefile
@@ -1844,6 +1844,7 @@
SUBDIR += py-spyne
SUBDIR += py-sseclient
SUBDIR += py-starlette
+ SUBDIR += py-strawberry-graphql-django
SUBDIR += py-swapper
SUBDIR += py-textile
SUBDIR += py-ticketutil
diff --git a/www/py-strawberry-graphql-django/Makefile b/www/py-strawberry-graphql-django/Makefile
new file mode 100644
index 000000000000..55cb3ce0d6ab
--- /dev/null
+++ b/www/py-strawberry-graphql-django/Makefile
@@ -0,0 +1,34 @@
+PORTNAME= strawberry-graphql-django
+DISTVERSION= 0.36.0
+CATEGORIES= www python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= strawberry_graphql_django-${DISTVERSION}
+
+MAINTAINER= kai@FreeBSD.org
+COMMENT= Strawberry GraphQL Django extension
+WWW= https://github.com/strawberry-graphql/strawberry-django
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PY_SETUPTOOLS} \
+ ${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django32>=3.2:www/py-django32@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}strawberry-graphql>=0.212.0:devel/py-strawberry-graphql@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist pep517
+
+NO_ARCH= yes
+
+OPTIONS_DEFINE= DEBUG-TOOLBAR ENUM
+OPTIONS_DEFAULT= DEBUG-TOOLBAR ENUM
+
+DEBUG-TOOLBAR_DESC= Debug support
+ENUM_DESC= Integration for Django's TextChoices/IntegerChoices enumerations
+
+DEBUG-TOOLBAR_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django-debug-toolbar>=3.4:www/py-django-debug-toolbar@${PY_FLAVOR}
+ENUM_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django-choices-field>=2.2.2:www/py-django-choices-field@${PY_FLAVOR}
+
+.include <bsd.port.mk>
diff --git a/www/py-strawberry-graphql-django/distinfo b/www/py-strawberry-graphql-django/distinfo
new file mode 100644
index 000000000000..f6b3b3932c73
--- /dev/null
+++ b/www/py-strawberry-graphql-django/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1711884002
+SHA256 (strawberry_graphql_django-0.36.0.tar.gz) = 37b7875a49b72e405ab275efcd6fe953a45cf9b3e2c45d57bae9113cbe8d18c5
+SIZE (strawberry_graphql_django-0.36.0.tar.gz) = 68951
diff --git a/www/py-strawberry-graphql-django/pkg-descr b/www/py-strawberry-graphql-django/pkg-descr
new file mode 100644
index 000000000000..bea2083c6410
--- /dev/null
+++ b/www/py-strawberry-graphql-django/pkg-descr
@@ -0,0 +1,15 @@
+This package provides powerful tools to generate GraphQL types, queries,
+mutations and resolvers from Django models.
+
+Supported Features:
+
+* GraphQL type generation from models
+* Filtering, pagination and ordering
+* Basic create, retrieve, update and delete (CRUD) types and mutations
+* Basic Django auth support, current user query, login and logout mutations
+* Django sync and async views
+* Permission extension using django's permissioning system
+* Relay support with automatic resolvers generation
+* Query optimization to improve performance and avoid common pitfalls (e.g n+1)
+* Debug Toolbar integration with graphiql to display metrics like SQL queries
+* Unit test integration