mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-10 16:22:20 +03:00
Merge branch 'main' into graphiql-v2
This commit is contained in:
commit
e13d882c88
|
@ -16,12 +16,12 @@ repos:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
exclude: README.md
|
exclude: README.md
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v2.37.3
|
rev: v3.2.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: [--py37-plus]
|
args: [--py37-plus]
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 22.6.0
|
rev: 22.10.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
|
|
|
@ -14,7 +14,7 @@ whole Graphene repository:
|
||||||
```bash
|
```bash
|
||||||
# Get the example project code
|
# Get the example project code
|
||||||
git clone https://github.com/graphql-python/graphene-django.git
|
git clone https://github.com/graphql-python/graphene-django.git
|
||||||
cd graphene-django/examples/cookbook
|
cd graphene-django/examples/cookbook-plain
|
||||||
```
|
```
|
||||||
|
|
||||||
It is good idea (but not required) to create a virtual environment
|
It is good idea (but not required) to create a virtual environment
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Cookbook Example Django Project
|
Cookbook Example (Relay) Django Project
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
This example project demos integration between Graphene and Django.
|
This example project demos integration between Graphene and Django.
|
||||||
|
@ -60,5 +60,5 @@ Now you should be ready to start the server:
|
||||||
Now head on over to
|
Now head on over to
|
||||||
[http://127.0.0.1:8000/graphql](http://127.0.0.1:8000/graphql)
|
[http://127.0.0.1:8000/graphql](http://127.0.0.1:8000/graphql)
|
||||||
and run some queries!
|
and run some queries!
|
||||||
(See the [Graphene-Django Tutorial](http://docs.graphene-python.org/projects/django/en/latest/tutorial-plain/#testing-our-graphql-schema)
|
(See the [Graphene-Django Tutorial](http://docs.graphene-python.org/projects/django/en/latest/tutorial-relay/#testing-our-graphql-schema)
|
||||||
for some example queries)
|
for some example queries)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from django import forms
|
from django import forms
|
||||||
from py.test import raises
|
from pytest import raises
|
||||||
|
|
||||||
import graphene
|
import graphene
|
||||||
from graphene import (
|
from graphene import (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import pytest
|
import pytest
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from py.test import raises
|
from pytest import raises
|
||||||
|
|
||||||
from graphene import Field, ObjectType, Schema, String
|
from graphene import Field, ObjectType, Schema, String
|
||||||
from graphene_django import DjangoObjectType
|
from graphene_django import DjangoObjectType
|
||||||
|
|
|
@ -3,7 +3,7 @@ import copy
|
||||||
import graphene
|
import graphene
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from graphene import InputObjectType
|
from graphene import InputObjectType
|
||||||
from py.test import raises
|
from pytest import raises
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
from ..serializer_converter import convert_serializer_field
|
from ..serializer_converter import convert_serializer_field
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from py.test import raises
|
from pytest import raises
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
from graphene import Field, ResolveInfo
|
from graphene import Field, ResolveInfo
|
||||||
|
|
|
@ -8,8 +8,8 @@ import graphene
|
||||||
|
|
||||||
from graphene import Field, ResolveInfo
|
from graphene import Field, ResolveInfo
|
||||||
from graphene.types.inputobjecttype import InputObjectType
|
from graphene.types.inputobjecttype import InputObjectType
|
||||||
from py.test import raises
|
from pytest import raises
|
||||||
from py.test import mark
|
from pytest import mark
|
||||||
from rest_framework import serializers
|
from rest_framework import serializers
|
||||||
|
|
||||||
from ...types import DjangoObjectType
|
from ...types import DjangoObjectType
|
||||||
|
|
|
@ -3,7 +3,7 @@ from collections import namedtuple
|
||||||
import pytest
|
import pytest
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
from py.test import raises
|
from pytest import raises
|
||||||
|
|
||||||
import graphene
|
import graphene
|
||||||
from graphene import NonNull
|
from graphene import NonNull
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from py.test import raises
|
from pytest import raises
|
||||||
|
|
||||||
from ..forms import GlobalIDFormField, GlobalIDMultipleChoiceField
|
from ..forms import GlobalIDFormField, GlobalIDMultipleChoiceField
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ from django.db import models
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from django.utils.functional import SimpleLazyObject
|
from django.utils.functional import SimpleLazyObject
|
||||||
from graphql_relay import to_global_id
|
from graphql_relay import to_global_id
|
||||||
from py.test import raises
|
from pytest import raises
|
||||||
|
|
||||||
import graphene
|
import graphene
|
||||||
from graphene.relay import Node
|
from graphene.relay import Node
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
from py.test import raises
|
from pytest import raises
|
||||||
|
|
||||||
from ..registry import Registry
|
from ..registry import Registry
|
||||||
from ..types import DjangoObjectType
|
from ..types import DjangoObjectType
|
||||||
|
|
Loading…
Reference in New Issue
Block a user