Skip to content
Snippets Groups Projects
Verified Commit 69eb7ae0 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Update and release

parent 3648b669
No related branches found
No related tags found
No related merge requests found
# graphene-django-optimizer
[![build status](https://img.shields.io/travis/tfoxy/graphene-django-optimizer.svg)](https://travis-ci.com/github/tfoxy/graphene-django-optimizer)
[![coverage](https://img.shields.io/codecov/c/github/tfoxy/graphene-django-optimizer.svg)](https://codecov.io/gh/tfoxy/graphene-django-optimizer)
[![PyPI version](https://img.shields.io/pypi/v/graphene-django-optimizer.svg)](https://pypi.org/project/graphene-django-optimizer/)
![python version](https://img.shields.io/pypi/pyversions/graphene-django-optimizer.svg)
![django version](https://img.shields.io/pypi/djversions/graphene-django-optimizer.svg)
Optimize queries executed by [graphene-django](https://github.com/graphql-python/graphene-django) automatically, using [`select_related`](https://docs.djangoproject.com/en/2.0/ref/models/querysets/#select-related), [`prefetch_related`](https://docs.djangoproject.com/en/2.0/ref/models/querysets/#prefetch-related) and [`only`](https://docs.djangoproject.com/en/2.0/ref/models/querysets/#only) methods of Django QuerySet.
......@@ -16,8 +10,6 @@ Optimize queries executed by [graphene-django](https://github.com/graphql-python
pip install graphene-django-optimizer
```
*Note: If you are using Graphene V2, please install version `0.8`. v0.9 and forward will support only Graphene V3*
## Usage
Having the following schema based on [the tutorial of graphene-django](http://docs.graphene-python.org/projects/django/en/latest/tutorial-plain/#hello-graphql-schema-and-object-types) (notice the use of `gql_optimizer`)
......@@ -198,7 +190,7 @@ class IngredientType(gql_optimizer.OptimizedDjangoObjectType):
class Meta:
model = Ingredient
def resolve_calculated_calories(root, info):
return get_calories_for_ingredient(root.id)
......
......@@ -13,14 +13,14 @@ def read(fname):
setup(
name="graphene-django-optimizer",
version="0.9.1",
author="Tomás Fox",
author_email="tomas.c.fox@gmail.com",
name="graphene-django-optimizer-reloaded",
version="0.9.2",
author="Jonathan Weth",
author_email="dev@jonathanweth.de",
description="Optimize database access inside graphene queries.",
license="MIT",
keywords="graphene django optimizer optimize graphql query prefetch select related",
url="https://github.com/tfoxy/graphene-django-optimizer",
url="https://edugit.org/AlekSIS/libs/graphene-django-optimizer",
packages=["graphene_django_optimizer"],
setup_requires=pytest_runner,
long_description=read("README.md"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment