Commit Graph

307 Commits

Author SHA1 Message Date
Jonathan Kim
12d8ef813c Set any arbitrary meta fields onto the meta instance 2020-03-15 18:25:40 +00:00
Syrus Akbary
60a9609b9a
Updated all str.format(…) to f-strings (#1158)
* Updated all str.format(…) to f-strings

This revamps the PR #984

* Pass black

* Fix flake8

* Updated objecttype

* Fix black version
2020-03-14 17:32:44 -07:00
Rob Blackbourn
1cf303a27b
Added support for subscription (#1107)
* Added support for subscription

* Added pre-commit hooks for black and formatted changed files

* Checked with flake8

* Integrated changes from master.

Co-authored-by: Rob Blackbourn <rblackbourn@bhdgsystematic.com>
Co-authored-by: Rob Blackbourn <rtb@beast.jetblack.net>
2020-03-14 16:48:12 +00:00
Christoph Zwerschke
88f79b2850 Fix types in Schema docstring (#1100) 2020-03-04 15:26:09 +01:00
Christoph Zwerschke
5e6f68957e Use latest graphql-core 3.1.0b1 instead of 3.0.3
Adapt Schema, because there is no type reducer in core 3.1 any more.
2020-03-04 12:23:40 +01:00
Jonathan Kim
98e10f0db8
Replace INVALID with Undefined (#1146) 2020-02-27 20:51:59 +00:00
Jayden Windle
ac98be7836
Use Undefined instead of the now deprecated INVALID (#1143) 2020-02-26 21:18:13 +01:00
정유석
be97a369f7
fix typo in class 'Interface' (#1135) 2020-02-18 08:53:48 +00:00
Jean-Louis Fuchs
ad0b3a529c
The default_value of InputField should be INVALID (#1111)
* The default_value of InputField should be INVALID

Since GraphQL 3.0 there is a distinction between None and INVALID (no value).
The tests captured the bug and are updated.

* Update minimum graphql-core version

* Use Undefined instead of INVALID

Co-authored-by: Jonathan Kim <jkimbo@gmail.com>
2020-02-08 20:24:58 +00:00
Jonathan Kim
a3b215d891
Remove AbstractType (#1053) 2019-09-27 09:54:19 +01:00
Min ho Kim
e90aa1b712 Fix typos (#1066)
Fixed typos in docs, string literals, comments, test name
2019-09-25 19:57:53 -04:00
Mel van Londen
8e7d76bbce
Graphene v3 following v3 graphql-core (#1048)
* v3.0 - remove Python 2.x from build (#983)

* Change travis to only compile for p3.6+

* Changed tox to only run Python 3.6+

* Changed library classifiers to reflect support in Python 3.6+

* Changed version to 3.0.0 development

In [15]: get_version((3, 0, 0, "alpha", 0))
Out[15]: '3.0.dev20190601212304'

* Reorganize Tests (#985)

We no longer need a dedicated folder for Python3.6+ tests
We no longer need to check six.PY3 in tests

* Upgrade black to 19.3b0 (#987)

* Remove six dependency (#986)

* No one is using func_name

* Remove six simple usages

* Remove six requirement

* Remove `six.with_metaclass` calls

* pytest-asyncio should be a regular dependency now with Py3 move

* Change dependency to graphql-core-next (#988)

* Changed dependencies to core-next

* Converted Scalars

* ResolveInfo name change

* Ignore .venv

* Make Schema compatible with GraphQL-core-next

* Ignore more venv names and mypy and pytest caches

* Remove print statements for debugging in schema test

* core-next now provides out_type and out_name

* Adapt date and time scalar types to core-next

* Ignore the non-standard result.invalid flag

* Results are named tuples in core-next (immutable)

* Enum values are returned as dict in core-next

* Fix mutation tests with promises

* Make all 345 tests pass with graphql-core-next

* Remove the compat module which was only needed for older Py version

* Remove object as base class (not needed in Py 3)

* We can assume that dicts are ordered in Py 3.6+

* Make use of the fact that dicts are iterable

* Use consistent style of importing from pytest

* Restore compatibility with graphql-relay-py v3

Add adpaters for the PageInfo and Connection args.

* Avoid various deprecation warnings

* Use graphql-core 3 instead of graphql-core-next

* Update dependencies, reformat changes with black

* Update graphene/relay/connection.py

Co-Authored-By: Jonathan Kim <jkimbo@gmail.com>

* Run black on setup.py

* Remove trailing whitespace
2019-08-17 17:07:53 -04:00
Ntale Shadik
c96bd680d7 Add interfaces meta argument on Mutations (#1023) 2019-07-24 18:44:22 +01:00
David Anderson
da1359ecca expose livehtml autobuild in Makefile + Add API autodoc (#971)
* expose livehtml autobuild in Makefile

* add API documentation for schema

* document graphene core API

* fixes black lint

* Update graphene/types/union.py

Co-Authored-By: Jonathan Kim <jkimbo@gmail.com>

* Update graphene/types/argument.py

Co-Authored-By: Jonathan Kim <jkimbo@gmail.com>

* Update graphene/types/field.py

Co-Authored-By: Jonathan Kim <jkimbo@gmail.com>

* Update graphene/types/inputfield.py

Co-Authored-By: Jonathan Kim <jkimbo@gmail.com>

* add note about non-functional `interfaces` meta argument in mutation

* update with other virtual environment configuration

* pin autobuild

* format argument example code

* format enum input object and interface examples

* format enum mutation union examples

* revise documentation with imports, capitalization
2019-06-09 15:36:06 -07:00
David Anderson
ec9f76cfae Fix flaky date tests (#982)
* fix flaky datetime test with fixed values

* rename fixtures for clarity in date+time tests
2019-06-01 13:41:45 -07:00
Eran Kampf
eb7966eca7
Fix for metaclasses that use type annotation (Issue #979) (#981)
* Replicate error with test

* Fix - ignore parameters we do not recognize

* Seperate Python3.6+ tests to their own folder

* lint

* Unused import

* Black formatting
2019-05-31 14:31:17 -07:00
NyanKiyoshi
6a4091b3e4 from_enum can now take a deprecation reason (#957) 2019-05-06 10:17:33 -07:00
Eran Kampf
d0cfee5641
Make UUID compatible (Fixed issue #936) (#937)
* Make UUID compatible

* Fix typo

* black code formatting
2019-04-08 14:06:32 -07:00
Andreas Sodeur
7b6dae7fa3 [863] DateTime, Date, and Time now accept datetime.datetime, datetime.date,… (#864)
* DateTime, Date, and Time now accept datetime.datetime, datetime.date, and datetime.time resp. inputs when used as variables

* Added tests and improved resilience against bad DateTime, Date, and Time inputs.

* Fixed string type checks too narrow for py2.7

* fixed some of pre-commit's complaints
2019-03-31 11:57:34 +01:00
Jonathan Kim
ca9188a615 Dict or attr default resolver (#638)
* Add dict_or_attr resolver and set it as default

* Add some tests

* Dry up code

* Updated formatting
2019-03-11 10:24:11 -07:00
Dan
9ae2359b87 Run pre-commit autoupdate to bump versions of precommit hooks, then run them on all files (#913) 2019-03-08 11:09:45 -08:00
cherls
8e53672a1d Add mutation field default arg test 2018-11-05 13:30:09 -05:00
cherls
4d5a091d16 Add default Field description as docstring 2018-11-05 13:30:05 -05:00
Dan Palmer
00d370b228
Expose documentation for Union types 2018-09-08 17:20:39 +01:00
Adam Johnson
4f2b278e12 black reformat 2018-08-29 13:07:45 +03:00
Adam Johnson
7dd8305bdf Change deprecated execute() arguments to new ones
Changed in https://github.com/graphql-python/graphql-core/pull/185 , the docs here were out of date, as were the tests.
2018-08-29 12:35:44 +03:00
Mark Chackerian
00cc97875d Merge branch 'master' into issue-703 2018-07-20 10:25:46 -04:00
Sébastien Diemer
1eae96fd43 fix black formatting 2018-07-19 23:28:26 +02:00
Mark Chackerian
8ca7b855ac more flake8 fixes 2018-07-16 18:31:32 -04:00
Mark Chackerian
c076412ba5 automatically generated linting fixes 2018-07-16 18:20:04 -04:00
Mark Chackerian
fc3dbf0963 Merge branch 'master' into issue-703
# Conflicts:
#	graphene/__init__.py
#	graphene/types/__init__.py
2018-07-16 17:50:41 -04:00
Mark Chackerian
0fdc2ca3eb should fix some import issues with python 2.7 2018-07-16 17:20:49 -04:00
Syrus Akbary
319605bfaf
Merge branch 'master' into sdr/subclass_mutations 2018-07-09 18:49:07 -07:00
Daniel Gallagher
142f4a58d8 Run black formatter via pre-commit on all files 2018-07-06 14:03:15 -07:00
Daniel Gallagher
086f9dda99 Run black formatter via pre-commit on all files 2018-07-06 12:09:23 -07:00
Sébastien Diemer
9f366e93c6 __wip__ add failed test
Just to ease review.
TODO: merge with next commit.
2018-07-02 10:03:39 +02:00
Dan
12ee52a13a Add pyupgrade pre-commit hook and run on all files (#736) 2018-06-09 14:01:29 +01:00
Dan
1b3e7f3b96 Add flake8 pre-commit hook and manually edit files to pass flake8 validation (#746)
Add flake8 pre-commit hook and manually edit files to pass flake8 validation
2018-06-05 21:47:07 +01:00
Jeremiah Lowin
00ccc2056b Don't overwrite fields on InputObject - closes #720 2018-05-31 21:52:35 -04:00
Dan
034b5385a5 Add isort precommit hook & run on all files (#743)
* Add isort and seed-isort-config pre-commit hook

* Fix erroneous isort moving comment to the top of file
2018-05-28 19:18:54 +01:00
Nikordaris
034765aebe Added partial support to Dynamic type (#725) 2018-05-25 16:20:22 +01:00
Daniel Gallagher
9777184721 Add pre-commit tool to repository, and run on all files 2018-05-22 10:56:58 -07:00
Mark Chackerian
de050fa6db fix linting error 2018-05-15 12:09:12 -04:00
Mark Chackerian
d40ef4be2b adds Decimal to types __all__ 2018-05-15 11:42:43 -04:00
Mark Chackerian
49258193ed adds decimal type and associated tests 2018-05-15 11:36:08 -04:00
Syrus Akbary
9408ba70d1 Fields default_value are no longer dismissed. Fixed #702. 2018-04-07 15:31:04 -07:00
Syrus Akbary
50cd43c6e5 Added Date, DateTime and Time to global exports 2018-03-29 22:31:36 -07:00
Syrus Akbary
85e354c139 Merge branch 'master' into feature/date-improvements
# Conflicts:
#	graphene/types/datetime.py
2018-03-29 22:10:18 -07:00
Syrus Akbary
b4255e55fd Use aniso8601 instead of iso8601 2018-03-29 22:05:12 -07:00
Syrus Akbary
d46d8e8c33 Allow mutations to be required. Improved testing. Fixed #694 2018-03-21 21:31:56 -07:00