Commit Graph

1004 Commits

Author SHA1 Message Date
Sezgin ACER
8934393909
Add check for serializers.HiddenField on fields_for_serializer function (#1419)
* Add check for `serializers.HiddenField` on fields_for_serializer function

* Add pre-commit changes
2023-06-06 09:20:32 +03:00
Steven DeMartini
520ddeabf6
Fix graphiql explorer styles by including official CSS, and update local example app for testing (#1418)
* Add venv and .venv to gitignore since common venv paths

* Update cookbook-plain app requirements and local-dev notes

This also adds the DEFAULT_AUTO_FIELD to the app's Django settings to
resolve this warning when running `migrate`:

```
ingredients.Category: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
	HINT: Configure the DEFAULT_AUTO_FIELD setting or the IngredientsConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
```

* Fix #1417 graphiql explorer styles by including official CSS

Like in the official graphiql-plugin-explorer example here
6198646919/packages/graphiql-plugin-explorer/examples/index.html (L26-L29)

Resolves https://github.com/graphql-python/graphene-django/issues/1417

* Update GraphiQL version

---------

Co-authored-by: Steven DeMartini <sjdemartini@users.noreply.github.com>
Co-authored-by: Kien Dang <mail@kien.ai>
2023-06-02 11:48:53 +03:00
Kien Dang
38709d8396
Correct schema write test (#1416)
<Mock>.called_once() just returns a Mock, so assert <Mock>.called_once()
always passes. We want <Mock>.assert_called_once().
2023-05-27 16:53:22 +03:00
Kien Dang
63fd98393f
Set pypi GH action to latest v1 (#1415) 2023-05-27 16:26:52 +03:00
Paul Craciunoiu
5a19111182 Fix graphiql for async 2023-05-26 23:01:33 +08:00
Firas Kafri
4e5acd4702
Fix linting issues (#1412) 2023-05-24 16:13:23 +03:00
Firas Kafri
ebf49431e9
Bump version 2023-05-24 16:10:22 +03:00
Firas Kafri
b75904d4c8
long_description_content_type='text/markdown' 2023-05-24 16:07:45 +03:00
Firas Kafri
7fe661d423
Bump version 2023-05-24 16:03:14 +03:00
ndpu
be17278b49
Add DjangoFormInputObjectType to forms/types (#1325)
* Add DjangoFormInputObjectType to forms/types

InputObjectType derived class which gets fields from django form.
Type of fields with choices (converted to enum) is set to custom scalar
type (using Meta.object_type) to dynamically convert enum values back.

* Correct Reporter model a_choice field type according to CHOICES tuple

* Add tests for DjangoFormInputObjectType

* Add pyenv files to .gitignore

* Fix pyupgrade

* Fix tests

* Add docs

* Fix docs example

---------

Co-authored-by: Firas Kafri <3097061+firaskafri@users.noreply.github.com>
2023-05-24 15:58:50 +03:00
ndpu
a6596273cf
Update docs/requirements.txt (#1410)
* change Sphinx version from 1.5.3 to 7.0.0

* change sphinx-autobuild version from 0.7.1 to 2021.3.14

* add pygments-graphql-lexer to docs/requirements.txt
2023-05-24 15:55:20 +03:00
Mykhailo Havelia
388ca41d64
fix: use execution_context_class attribute for GraphQLView (#1398)
* fix: use execution_context_class attribute for GraphQLView
2023-05-24 15:54:44 +03:00
Josh Warwick
37ebd6309b follow main removing validate call 2023-05-16 20:26:05 +01:00
Josh Warwick
c16276c731
Merge branch 'main' into support-async 2023-05-16 20:20:11 +01:00
Josh Warwick
2659d67fd0 updates tests 2023-05-16 20:19:35 +01:00
Josh Warwick
848536ee3a Clean up wrapped list resolver 2023-05-16 19:46:07 +01:00
Josh Warwick
84ba7d775a Remove unused path 2023-05-16 17:46:23 +01:00
Josh Warwick
fba274dc4d refactor middleware 2023-05-16 17:09:15 +01:00
Josh Warwick
c27dd6c732 cleanup middleware 2023-05-16 17:03:24 +01:00
Josh Warwick
930248f78d Refactor out async helper functions 2023-05-16 16:20:13 +01:00
Josh Warwick
d3f8fcf906 handle connections without middleware 2023-05-16 16:08:40 +01:00
Josh Warwick
8c068fbc2b Update to pull out mutations and ensure that DjangoFields don't get double sync'd 2023-05-10 19:17:30 +01:00
Josh Warwick
b134ab0a3e Handle custom Djangoconnectionresolvers 2023-05-09 23:27:02 +01:00
Josh Warwick
b69476f50f improve async detection 2023-05-09 22:58:15 +01:00
Josh Warwick
791209f557 Rejig concept to use middleware 2023-05-09 21:52:55 +01:00
Josh Warwick
58b92e6ed3 linting 2023-05-05 16:28:40 +01:00
Josh Warwick
c501fdb20b swap back to python 3.11 2023-05-05 16:25:33 +01:00
Josh Warwick
76eeea4e78 Update tests for queries 2023-05-05 16:19:13 +01:00
Josh Warwick
e9d5e88ea2 Handle the default django list field and test the async execution of the fields 2023-05-05 11:18:21 +01:00
Firas Kafri
72a3700856
Update Development Status calassifier (#1409) 2023-05-05 13:04:47 +03:00
shukryzablah
09f9b6d2f1
Remove redundant call to validate (#1393)
* Remove redundant call to validate

The call to `validate` in the django view is redundant with the validation call in graphql-core.

* Remove whitespace

---------

Co-authored-by: Firas K <3097061+firaskafri@users.noreply.github.com>
2023-05-05 13:04:22 +03:00
Firas Kafri
6f13d28b6e
Update README.md (#1408)
* Update README.md

* Delete README.rst

* Update long_description source to be from README.md
2023-05-04 23:54:09 +03:00
Firas Kafri
ce7492b5ae
Delete README.rst 2023-05-04 23:46:15 +03:00
Kien Dang
52f992183f
Add GraphiQL Explorer plugin (#1397) 2023-05-04 22:06:10 +03:00
Josh Warwick
c10753d4b1 most recent changes 2023-05-04 15:51:25 +01:00
Josh Warwick
4e5862f8fb Add logging of errors in execution 2023-05-04 15:30:43 +01:00
Josh Warwick
4d5132d925 Remove tests for now 2023-05-04 15:30:43 +01:00
Josh Warwick
bdb8e84446 Update cookbook for async testing 2023-05-04 15:30:43 +01:00
Josh Warwick
64d311d770 Copy tests for query to test async execution 2023-05-04 15:30:42 +01:00
Josh Warwick
0a84a6ea38 Handle async get_node 2023-05-04 15:30:23 +01:00
Josh Warwick
1b2d5e02e4 handle async serlizer mutations 2023-05-04 15:30:02 +01:00
Josh Warwick
66938e9e29 async hates csrf 2023-05-04 15:30:02 +01:00
Josh Warwick
ebbc578435 Strange scope 2023-05-04 15:30:02 +01:00
Josh Warwick
7ddaf9f5e6 Handle coroutine results from resolvers in connections and filter connections 2023-05-04 15:30:02 +01:00
Josh Warwick
28846f9ac9 drop in an async view 2023-05-04 15:30:02 +01:00
Josh Warwick
e78fb86ce6 handle regualr django lists 2023-05-04 15:30:02 +01:00
Josh Warwick
f04f0d33ff Support foriegn key connections running async 2023-05-04 15:30:00 +01:00
Josh Warwick
74998afb69 Support Django Connection resolving in an async context 2023-05-04 15:29:16 +01:00
Josh Warwick
6a5b28d09f Resolve DjangoObjectType getNode when in an async context 2023-05-04 15:29:16 +01:00
Ülgen Sarıkavak
8540a9332c
Add support for Python 3.11 (#1365)
* Add support for Python 3.11

* Fix Python 3.11 compatibility matrix

* Add temporary fix for default enum description

---------

Co-authored-by: Firas Kafri <firaskafri@Firass-MacBook-Pro-2.local>
2023-05-04 15:19:24 +03:00