Commit Graph

45 Commits

Author SHA1 Message Date
Jonathan Kim
cb3bfe011f
Use default_resolver to resolve values when using the source at… (#1155) 2020-03-16 16:20:04 +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
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
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
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
Syrus Akbary
d8fac58701 Fixed source resolver and added tests for it 2017-08-01 13:59:18 -07:00
Syrus Akbary
9769612a44 Make resolvers simple again 2017-07-23 23:10:15 -07:00
Syrus Akbary
6ae9717415 Improved automatic resolver args from annotations 2017-07-23 18:57:17 -07:00
Syrus Akbary
f1624af08a Fixed Flake issues 2017-07-12 21:45:06 -07:00
Syrus Akbary
4b71465922 Improved lazy types support in Graphene
This commit also adds support for string types in Field, InputField, List and NonNull, where the string will be import. Usage like: Field("graphene.String")
2017-04-06 22:13:06 -07:00
James Pollock
f728542ce7 Allow class methods to be used as a field source 2017-01-27 21:17:49 +00:00
Syrus Akbary
27cd00b9f9 Merge pull request #391 from graphql-python/features/mounted-refactor
Refactored mounted types logic
2016-12-17 16:29:44 -08:00
Syrus Akbary
93dacda923 Refactored mounted types logic 2016-12-17 16:25:49 -08:00
Jim van Eeden
774e9bf463 fix so partial functions can be passed to field, solves issue #316 2016-12-02 15:35:43 +01:00
Syrus Akbary
b72684192f Fixed tests. 2016-09-21 08:33:56 -07:00
Syrus Akbary
aa86c27ea2 Merge pull request #298 from Globegitter/default-resolver-default-value
Added default value for default resolver.
2016-09-21 01:58:33 -07:00
Markus Padourek
d9b8f5941d Added default value for default resolver. 2016-09-21 09:34:29 +01:00
Syrus Akbary
8fb4214809 Improved Field args 2016-09-18 13:21:02 -07:00
Syrus Akbary
6fa32a7287 Fixed PEP8 errors 2016-08-14 16:58:32 -07:00
Syrus Akbary
e2036da75f Added relay.Connection and relay.ConnectionField 2016-08-13 21:05:45 -07:00
Syrus Akbary
2696ae9b73 Make new_types the deafult types 2016-08-13 14:43:51 -07:00
Syrus Akbary
387b997b1d Fixed tests and flake errors 2016-08-06 19:42:06 -07:00
Syrus Akbary
9a9d7f8873 Moved Interface to ObjectType. Improved integration with latest GraphQL-core 2016-06-21 11:54:14 -07:00
Syrus Akbary
ccfed3df3f Improved Python3 compat 2016-06-15 21:40:12 -07:00
Syrus Akbary
5ccd815fbd Added ConnectionField 2016-06-14 23:48:25 -07:00
Syrus Akbary
c74a75133e Autolint all the files 2016-06-14 22:29:02 -07:00
Syrus Akbary
8078937359 Improved InputObjectType abstraction 2016-06-12 01:15:57 -07:00
Syrus Akbary
e6788993ba Simplified interface logic 2016-06-11 00:47:38 -07:00
Syrus Akbary
51e97510c0 Improved relay nodes and field copies 2016-06-10 00:23:31 -07:00
Syrus Akbary
522f769cad Improved Node/Mutation fields 2016-06-09 22:56:41 -07:00
Syrus Akbary
9025b1c8f0 Improve Field and InputField copy 2016-06-09 22:03:04 -07:00
Syrus Akbary
d8d884c9be Improved extend interfaces syntax 2016-06-09 21:47:06 -07:00
Syrus Akbary
d67b7bc6a1 Improved relay compatibility 2016-06-09 21:24:28 -07:00
Syrus Akbary
b24e9a1051 Refactored fields getter to be immutable 2016-06-08 22:23:28 -07:00
Syrus Akbary
3a566241f3 Use always the resolve methods as unbounds. __func__ to the rescue 2016-06-06 02:06:17 -07:00
Syrus Akbary
0db5b1cfbc Move resolver to interface too 2016-06-06 02:03:57 -07:00
Syrus Akbary
2b676743ae Removed slots 2016-06-04 19:06:33 -07:00
Syrus Akbary
0f10ae884f Allow InputObjectType instances to be Type proxies 2016-06-04 16:04:21 -07:00
Syrus Akbary
ab72393e66 Added InputField, InputObjectType. Improved Field implementation 2016-06-04 15:22:10 -07:00
Syrus Akbary
a1454fdd74 Fixed resolve context 2016-06-04 12:48:08 -07:00
Syrus Akbary
40ce604d2c Improved field resolving 2016-06-04 03:12:09 -07:00
Syrus Akbary
d58d1f8d89 Added List, NonNull types 2016-06-03 23:50:12 -07:00
Syrus Akbary
33d4f44f04 Refactored all graphene code moving to 1.0 2016-06-03 21:06:54 -07:00