graphene-django-query-optimizer


Namegraphene-django-query-optimizer JSON
Version 0.10.6 PyPI version JSON
download
home_pagehttps://mrthearman.github.io/graphene-django-query-optimizer
SummaryAutomatically optimize SQL queries in Graphene-Django schemas.
upload_time2025-01-11 08:38:04
maintainerNone
docs_urlNone
authorMatti Lamppu
requires_python<4,>=3.10
licenseMIT
keywords django graphene sql graphql python query optimizer optimization
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Graphene Django Query Optimizer

[![Coverage Status][coverage-badge]][coverage]
[![GitHub Workflow Status][status-badge]][status]
[![PyPI][pypi-badge]][pypi]
[![GitHub][licence-badge]][licence]
[![GitHub Last Commit][repo-badge]][repo]
[![GitHub Issues][issues-badge]][issues]
[![Downloads][downloads-badge]][pypi]
[![Python Version][version-badge]][pypi]

```shell
pip install graphene-django-query-optimizer
```

---

**Documentation**: [https://mrthearman.github.io/graphene-django-query-optimizer/](https://mrthearman.github.io/graphene-django-query-optimizer/)

**Source Code**: [https://github.com/MrThearMan/graphene-django-query-optimizer/](https://github.com/MrThearMan/graphene-django-query-optimizer/)

**Contributing**: [https://github.com/MrThearMan/graphene-django-query-optimizer/blob/main/CONTRIBUTING.md](https://github.com/MrThearMan/graphene-django-query-optimizer/blob/main/CONTRIBUTING.md)

---

Solve the GraphQL [N+1 problem] in [graphene-django] applications
just by changing a few imports, automatically adding the appropriate
[`only`](https://docs.djangoproject.com/en/dev/ref/models/querysets/#only),
[`select_related`](https://docs.djangoproject.com/en/dev/ref/models/querysets/#select-related),
and [`prefetch_related`](https://docs.djangoproject.com/en/dev/ref/models/querysets/#prefetch-related)
method calls to your QuerySets to fetch _only_ what you need.

```python
import graphene
from example_project.app.models import Example

from query_optimizer import DjangoObjectType, DjangoListField

class ExampleType(DjangoObjectType):
    class Meta:
        model = Example

class Query(graphene.ObjectType):
    all_examples = DjangoListField(ExampleType)

schema = graphene.Schema(query=Query)
```

[coverage-badge]: https://coveralls.io/repos/github/MrThearMan/graphene-django-query-optimizer/badge.svg?branch=main
[coverage]: https://coveralls.io/github/MrThearMan/graphene-django-query-optimizer?branch=main
[downloads-badge]: https://img.shields.io/pypi/dm/graphene-django-query-optimizer
[graphene-django]: https://github.com/graphql-python/graphene-django
[issues-badge]: https://img.shields.io/github/issues-raw/MrThearMan/graphene-django-query-optimizer
[issues]: https://github.com/MrThearMan/graphene-django-query-optimizer/issues
[licence-badge]: https://img.shields.io/github/license/MrThearMan/graphene-django-query-optimizer
[licence]: https://github.com/MrThearMan/graphene-django-query-optimizer/blob/main/LICENSE
[N+1 problem]: https://stackoverflow.com/a/97253
[pypi-badge]: https://img.shields.io/pypi/v/graphene-django-query-optimizer
[pypi]: https://pypi.org/project/graphene-django-query-optimizer
[repo-badge]: https://img.shields.io/github/last-commit/MrThearMan/graphene-django-query-optimizer
[repo]: https://github.com/MrThearMan/graphene-django-query-optimizer/commits/main
[status-badge]: https://img.shields.io/github/actions/workflow/status/MrThearMan/graphene-django-query-optimizer/test.yml?branch=main
[status]: https://github.com/MrThearMan/graphene-django-query-optimizer/actions/workflows/test.yml
[version-badge]: https://img.shields.io/pypi/pyversions/graphene-django-query-optimizer

            

Raw data

            {
    "_id": null,
    "home_page": "https://mrthearman.github.io/graphene-django-query-optimizer",
    "name": "graphene-django-query-optimizer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.10",
    "maintainer_email": null,
    "keywords": "django, graphene, sql, graphql, python, query, optimizer, optimization",
    "author": "Matti Lamppu",
    "author_email": "lamppu.matti.akseli@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/19/88/40118bf1d0dbb7b9250ba176fad4b11a5f605ddcfc2a7894b81c4bc3239c/graphene_django_query_optimizer-0.10.6.tar.gz",
    "platform": null,
    "description": "# Graphene Django Query Optimizer\n\n[![Coverage Status][coverage-badge]][coverage]\n[![GitHub Workflow Status][status-badge]][status]\n[![PyPI][pypi-badge]][pypi]\n[![GitHub][licence-badge]][licence]\n[![GitHub Last Commit][repo-badge]][repo]\n[![GitHub Issues][issues-badge]][issues]\n[![Downloads][downloads-badge]][pypi]\n[![Python Version][version-badge]][pypi]\n\n```shell\npip install graphene-django-query-optimizer\n```\n\n---\n\n**Documentation**: [https://mrthearman.github.io/graphene-django-query-optimizer/](https://mrthearman.github.io/graphene-django-query-optimizer/)\n\n**Source Code**: [https://github.com/MrThearMan/graphene-django-query-optimizer/](https://github.com/MrThearMan/graphene-django-query-optimizer/)\n\n**Contributing**: [https://github.com/MrThearMan/graphene-django-query-optimizer/blob/main/CONTRIBUTING.md](https://github.com/MrThearMan/graphene-django-query-optimizer/blob/main/CONTRIBUTING.md)\n\n---\n\nSolve the GraphQL [N+1 problem] in [graphene-django] applications\njust by changing a few imports, automatically adding the appropriate\n[`only`](https://docs.djangoproject.com/en/dev/ref/models/querysets/#only),\n[`select_related`](https://docs.djangoproject.com/en/dev/ref/models/querysets/#select-related),\nand [`prefetch_related`](https://docs.djangoproject.com/en/dev/ref/models/querysets/#prefetch-related)\nmethod calls to your QuerySets to fetch _only_ what you need.\n\n```python\nimport graphene\nfrom example_project.app.models import Example\n\nfrom query_optimizer import DjangoObjectType, DjangoListField\n\nclass ExampleType(DjangoObjectType):\n    class Meta:\n        model = Example\n\nclass Query(graphene.ObjectType):\n    all_examples = DjangoListField(ExampleType)\n\nschema = graphene.Schema(query=Query)\n```\n\n[coverage-badge]: https://coveralls.io/repos/github/MrThearMan/graphene-django-query-optimizer/badge.svg?branch=main\n[coverage]: https://coveralls.io/github/MrThearMan/graphene-django-query-optimizer?branch=main\n[downloads-badge]: https://img.shields.io/pypi/dm/graphene-django-query-optimizer\n[graphene-django]: https://github.com/graphql-python/graphene-django\n[issues-badge]: https://img.shields.io/github/issues-raw/MrThearMan/graphene-django-query-optimizer\n[issues]: https://github.com/MrThearMan/graphene-django-query-optimizer/issues\n[licence-badge]: https://img.shields.io/github/license/MrThearMan/graphene-django-query-optimizer\n[licence]: https://github.com/MrThearMan/graphene-django-query-optimizer/blob/main/LICENSE\n[N+1 problem]: https://stackoverflow.com/a/97253\n[pypi-badge]: https://img.shields.io/pypi/v/graphene-django-query-optimizer\n[pypi]: https://pypi.org/project/graphene-django-query-optimizer\n[repo-badge]: https://img.shields.io/github/last-commit/MrThearMan/graphene-django-query-optimizer\n[repo]: https://github.com/MrThearMan/graphene-django-query-optimizer/commits/main\n[status-badge]: https://img.shields.io/github/actions/workflow/status/MrThearMan/graphene-django-query-optimizer/test.yml?branch=main\n[status]: https://github.com/MrThearMan/graphene-django-query-optimizer/actions/workflows/test.yml\n[version-badge]: https://img.shields.io/pypi/pyversions/graphene-django-query-optimizer\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Automatically optimize SQL queries in Graphene-Django schemas.",
    "version": "0.10.6",
    "project_urls": {
        "Bug Tracker": "https://github.com/MrThearMan/graphene-django-query-optimizer/issues",
        "Documentation": "https://mrthearman.github.io/graphene-django-query-optimizer",
        "Homepage": "https://mrthearman.github.io/graphene-django-query-optimizer",
        "Repository": "https://github.com/MrThearMan/graphene-django-query-optimizer"
    },
    "split_keywords": [
        "django",
        " graphene",
        " sql",
        " graphql",
        " python",
        " query",
        " optimizer",
        " optimization"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "feb1334a6131a036f2b68f912431840199fa658a41021e3ddd40a6a234562d28",
                "md5": "3bf2ca9fb026c79cdd316e917b8aa5a3",
                "sha256": "d93aff953440a287bd2e1075afec64349d909c1ff6ad04ea808725c106703eb6"
            },
            "downloads": -1,
            "filename": "graphene_django_query_optimizer-0.10.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3bf2ca9fb026c79cdd316e917b8aa5a3",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.10",
            "size": 31979,
            "upload_time": "2025-01-11T08:38:03",
            "upload_time_iso_8601": "2025-01-11T08:38:03.485935Z",
            "url": "https://files.pythonhosted.org/packages/fe/b1/334a6131a036f2b68f912431840199fa658a41021e3ddd40a6a234562d28/graphene_django_query_optimizer-0.10.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "198840118bf1d0dbb7b9250ba176fad4b11a5f605ddcfc2a7894b81c4bc3239c",
                "md5": "0fe256e8d5fe405da827f9ac5f08486a",
                "sha256": "43e6b30b7c51430ec370ebd791cee935027b6477a3df3d14a8f0b84f574049ac"
            },
            "downloads": -1,
            "filename": "graphene_django_query_optimizer-0.10.6.tar.gz",
            "has_sig": false,
            "md5_digest": "0fe256e8d5fe405da827f9ac5f08486a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.10",
            "size": 26818,
            "upload_time": "2025-01-11T08:38:04",
            "upload_time_iso_8601": "2025-01-11T08:38:04.661622Z",
            "url": "https://files.pythonhosted.org/packages/19/88/40118bf1d0dbb7b9250ba176fad4b11a5f605ddcfc2a7894b81c4bc3239c/graphene_django_query_optimizer-0.10.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-11 08:38:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MrThearMan",
    "github_project": "graphene-django-query-optimizer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "graphene-django-query-optimizer"
}
        
Elapsed time: 0.42676s