graphene-django-query-optimizer


Namegraphene-django-query-optimizer JSON
Version 0.10.5 PyPI version JSON
download
home_pagehttps://mrthearman.github.io/graphene-django-query-optimizer
SummaryAutomatically optimize SQL queries in Graphene-Django schemas.
upload_time2024-10-19 06:50:33
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/a5/01/5b8c1412fea5af0db73d26d47491a13c49cf12e757a6ca465a75e9e2dfc7/graphene_django_query_optimizer-0.10.5.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.5",
    "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": "31b003da804b93d6ede3adbc88daaa204e3e8b15384a39c9cc95f3aba22900a4",
                "md5": "a00970b914775bfd97a724839b38e6c1",
                "sha256": "3439697d4306a2461a5eadea37d7595c4bf5672cfe25838a03968a27acfc50f1"
            },
            "downloads": -1,
            "filename": "graphene_django_query_optimizer-0.10.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a00970b914775bfd97a724839b38e6c1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.10",
            "size": 33787,
            "upload_time": "2024-10-19T06:50:32",
            "upload_time_iso_8601": "2024-10-19T06:50:32.171434Z",
            "url": "https://files.pythonhosted.org/packages/31/b0/03da804b93d6ede3adbc88daaa204e3e8b15384a39c9cc95f3aba22900a4/graphene_django_query_optimizer-0.10.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5015b8c1412fea5af0db73d26d47491a13c49cf12e757a6ca465a75e9e2dfc7",
                "md5": "e3c04b2b5a6cdd5a04d60808a7ee9e7d",
                "sha256": "1bd40c9147c6b9be4b77762faa12a8ebaff2ed4bfad8289d3bf6e5be9ebea937"
            },
            "downloads": -1,
            "filename": "graphene_django_query_optimizer-0.10.5.tar.gz",
            "has_sig": false,
            "md5_digest": "e3c04b2b5a6cdd5a04d60808a7ee9e7d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.10",
            "size": 27575,
            "upload_time": "2024-10-19T06:50:33",
            "upload_time_iso_8601": "2024-10-19T06:50:33.806792Z",
            "url": "https://files.pythonhosted.org/packages/a5/01/5b8c1412fea5af0db73d26d47491a13c49cf12e757a6ca465a75e9e2dfc7/graphene_django_query_optimizer-0.10.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-19 06:50:33",
    "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: 4.29200s