Commit Graph

298 Commits

Author SHA1 Message Date
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
Syrus Akbary
562cafc14f Fixed str on abstract types. Improved repr 2018-03-21 21:21:03 -07:00
Syrus Akbary
415b71f730
Merge pull request #679 from anisjonischkeit/patch-1
Made DateTime types return GraphQLError on fail
2018-03-20 20:26:46 -07:00
abawchen
a96ed550bd Fix deprecations url in DeprecationWarning message. 2018-03-20 08:14:59 +08:00
Syrus Akbary
2594cdb614 Fixed Meta included in Enum members. Fixed #685 2018-03-14 22:15:24 -07:00
Anis Jonischkeit
9973fd314f added tests for when bad input is passed into date/datetime/time fields 2018-03-14 13:06:10 +10:00
Anis Jonischkeit
2a67ffeb35 fixed function name for test to be what it is actually testing and prevent name colision 2018-03-14 12:51:34 +10:00
Anis Jonischkeit
1a1efbd77d
linting: added two lines after end of class 2018-02-27 10:21:41 +10:00
Anis Jonischkeit
84fbf5dc23
Made DateTime types return GraphQLError on fail
This change makes it so that when an incorrectly formatted date string gets passed to a Date / Time argument a GraphQLError is returned rather than a GraphQLLocatedError. Since Date / Time are types, their errors should not be in the same class as errors in your application. This is also inline with how other types work in graphene (graphene.Int, graphene.Float)
2018-02-27 10:00:20 +10:00
Syrus Akbary
0971a05b33 Improved support / assertion for graphql types in Schema 2018-02-09 10:49:08 -08:00