Commit Graph

884 Commits

Author SHA1 Message Date
Syrus Akbary
ad607eb122 Changed name from GrapheneType to GrapheneGraphQLType 2016-06-04 19:19:08 -07:00
Syrus Akbary
31ea09ff30 Improved options 2016-06-04 19:10:18 -07:00
Syrus Akbary
2b676743ae Removed slots 2016-06-04 19:06:33 -07:00
Syrus Akbary
ff7bf20f6d Added some mutable comments 2016-06-04 18:49:26 -07:00
Syrus Akbary
0f10ae884f Allow InputObjectType instances to be Type proxies 2016-06-04 16:04:21 -07:00
Syrus Akbary
50c1ab62ba Fixed Enum value getter 2016-06-04 15:45:54 -07:00
Syrus Akbary
449b8c67d1 Added reset_counter to ordered types. Improved node implementation 2016-06-04 15:36:32 -07:00
Syrus Akbary
ab72393e66 Added InputField, InputObjectType. Improved Field implementation 2016-06-04 15:22:10 -07:00
Syrus Akbary
89790e7508 Added Enum type 2016-06-04 14:06:16 -07:00
Syrus Akbary
58291a3b25 Moved GraphQL definitions to each corresponding file 2016-06-04 13:05:51 -07:00
Syrus Akbary
a1454fdd74 Fixed resolve context 2016-06-04 12:48:08 -07:00
Syrus Akbary
3acf5fd588 Improved tests 2016-06-04 11:20:45 -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
58dbfefc15 Improved interfaces in objecttypes 2016-06-03 21:28:29 -07:00
Syrus Akbary
33d4f44f04 Refactored all graphene code moving to 1.0 2016-06-03 21:06:54 -07:00
Syrus Akbary
7df1f8a88d Fixed unwrap cursor for make it work with DDT. Fixed #181 2016-05-31 21:15:10 -07:00
Syrus Akbary
b9695c877a Fixed ClientIDMutation GraphQL type name. Fixed #148 2016-05-31 20:55:01 -07:00
Syrus Akbary
9e715cd902 Fixed Django converter of field with grouped choices 2016-05-31 20:29:20 -07:00
Syrus Akbary
4636f9290a Merge branch 'master' into django-choices-grouping
# Conflicts:
#	graphene/contrib/django/tests/test_converter.py
2016-05-31 20:26:21 -07:00
Syrus Akbary
edfbbf52ef Fix field model 2016-05-31 20:05:49 -07:00
Syrus Akbary
4936e40258 Merge branch 'django-choices-translation' of https://github.com/Ian-Foote/graphene into fix_lazy_translated_choice 2016-05-31 19:49:25 -07:00
Syrus Akbary
7f6598518e Use Django forcetext for choices 2016-05-31 19:47:50 -07:00
Jacob Klapwijk
be449ab1c0 Fix ugettext_lazy objects in Choice tuples not being evaluated. Running .format() on it will return the string we want, and wont cause any problems when its run on a string without arguments 2016-05-31 16:11:54 +02:00
Syrus Akbary
da09bc3210 Fixed unregistered types in schema 2016-05-27 23:18:18 -07:00
Ian Foote
7d5d7eac3c Add test for django grouped choices 2016-05-26 16:07:18 +01:00
Ian Foote
8744f6a90e Add test for django choices with translation 2016-05-26 15:44:49 +01:00
Marc Tamlyn
aa2f4c5bac Failing test of interface implementation registration. 2016-05-26 12:16:45 +01:00
Syrus Akbary
8bc14953d7 Moved options testing to tests directory 2016-05-23 21:58:25 -07:00
Alec Aivazis
427a08106b fixed linting error 2016-05-22 17:17:07 -07:00
Alec Aivazis
161f198451 added test for auto_camelcase flag 2016-05-22 17:11:55 -07:00
Alec Aivazis
feb0825a63 fixed bug when no middlewares are present 2016-05-22 16:52:30 -07:00
Syrus Akbary
89074492e0 Merge pull request #177 from graphql-python/bugfixes/context-in-connectionfield
Added context to connectionfield resolver
2016-05-21 00:47:56 -07:00
Syrus Akbary
11a5ee189e Fixed issues 2016-05-21 00:40:26 -07:00
Syrus Akbary
ae8a23bfb8 Merge pull request #175 from AdrielVelazquez/master
Allow numbers in to_constant
2016-05-21 00:26:46 -07:00
Syrus Akbary
b9723356fe Fixed PEP8-Python3 errors 2016-05-20 23:52:00 -07:00
Syrus Akbary
577b76e436 Removed plugins. Added middlewares 2016-05-20 23:43:55 -07:00
Syrus Akbary
3428725314 First phase of middlewares 2016-05-20 23:25:54 -07:00
Syrus Akbary
8421b59d3a Improved resolver logic middleware by using promises 2016-05-20 21:44:31 -07:00
Adriel Velazquez
4d15bc4f79 Updating tests for regex changes 2016-05-20 15:20:10 -04:00
Adriel Velazquez
22b8b90fab Allow numbers in to_constant
Enums aren't effected if a int is passed along with the string.
2016-05-20 14:30:56 -04:00
Markus Padourek
5a949ce209 Added context to sqlalchemy connectionfield 2016-05-20 15:26:42 +01:00
Markus Padourek
83c2cb1b27 Add context to django connection field 2016-05-20 14:40:21 +01:00
Markus Padourek
bc98505ee5 Fixed missing context arg 2016-05-20 14:11:21 +01:00
Markus Padourek
e897efb79f Added test for with_context on connectionfield 2016-05-20 14:03:47 +01:00
Markus Padourek
7a5ad21b98 Added context to from_list 2016-05-20 14:00:57 +01:00
Markus Padourek
c4f29f050b Added context to connectionfield resolver 2016-05-20 13:59:39 +01:00
Syrus Akbary
25fd60d1ff Improved plugins 2016-05-20 01:23:45 -07:00
Syrus Akbary
b431bfe477 Fixed django OneToOne inverse relationship conversion. Fix #170 2016-05-19 21:56:05 -07:00
Syrus Akbary
3d66159826 Fixed lint error 2016-05-18 21:54:21 -07:00
Syrus Akbary
d6740e9ff5 Allow string references in InputTypes. Fixed #157 2016-05-18 21:49:37 -07:00
Syrus Akbary
10304eb8cf Added interfaces field into a ObjectType. Fixed #168 2016-05-18 21:00:50 -07:00
Marc Tamlyn
61e7beee7b Support with_context on ClientIDMutation.mutate_and_get_payload. 2016-05-18 11:50:03 +01:00
Syrus Akbary
7be5b83fdf Fixed PEP8 + Python 3 print 2016-05-11 23:54:15 -07:00
Syrus Akbary
7a27a9ef9f Fixed get_node 2016-05-11 23:47:10 -07:00
Syrus Akbary
c738d3db28 Added support for graphql 0.5.0 2016-05-10 00:42:18 -07:00
Alec Aivazis
76ea7d7637 schema now use default executor 2016-05-06 23:25:47 -07:00
Alec Aivazis
84834d1218 fixed reference to sync executor 2016-05-06 10:16:42 -07:00
Alec Aivazis
1d44f5f918 updated to reflect changes to graphql-core 2016-05-06 08:55:17 -07:00
Jon Dugan
9c2d571aae py 3.4/3.5 don't like the leading 0 2016-04-29 14:21:18 -05:00
Jon Dugan
f325964a9e one more linting fix 2016-04-29 14:16:31 -05:00
Jon Dugan
a158f4e002 liniting fixes 2016-04-29 14:10:28 -05:00
Jon Dugan
8e3b9b430e improve iso8601 handling 2016-04-29 13:58:49 -05:00
evalette
0960b7914d add test for sqlalchemy and identifier meta attribute 2016-04-13 14:39:11 +02:00
evalette
1f9252f26a add meta option identifier to SQLAlchemy nodes 2016-04-13 14:06:31 +02:00
karec
efa67fa1db start implement custom identifier 2016-04-12 22:24:12 +02:00
Syrus Akbary
1b39992dbe Merge branch 'refs/heads/master' into features/django-fields
Conflicts:
	graphene/contrib/django/converter.py
	graphene/core/classtypes/enum.py
2016-04-02 20:06:44 -07:00
Syrus Akbary
3bef8762e7 Improved Python syntax to be PEP8 complaint 2016-04-02 19:40:48 -07:00
Syrus Akbary
12c69c0635 Added DateTime custom Scalar 2016-04-02 19:37:28 -07:00
Syrus Akbary
81560df6a1 Added JSONString custom scalar 2016-04-02 19:19:40 -07:00
Syrus Akbary
ca0d1a3d7a Added RangeField conversion and testing 2016-04-02 18:58:36 -07:00
Syrus Akbary
7f96500353 Added support for converting Postgres fields 2016-04-02 18:02:13 -07:00
Syrus Akbary
a1dd2b6293 Added FileField and ImageField conversion. Fixed #137 2016-04-02 16:24:32 -07:00
Syrus Akbary
e1a693e57c Added Enum type ability to be mounted as field or argument 2016-04-02 00:14:09 -07:00
Syrus Akbary
68a9fb9fc4 Improved Django field choice converter 2016-04-01 23:43:42 -07:00
Syrus Akbary
bd88f2327e Added to_const str converter utility 2016-04-01 23:39:10 -07:00
Syrus Akbary
1f548f188d Fixed default query value in SQLAlchemyConnectionField. Fixed #133 2016-03-30 00:12:59 -07:00
Syrus Akbary
21ec1163b9 Added relay PageInfo, Connection super constructors. Fixed #131 2016-03-29 23:26:33 -07:00
Michael Elsdörfer
653e67de97 Allow empty list in SQLAlchemyConnectionField.
Custom resolve()'s empty list return value should take precedence over SQLAlchemyConnectionField default query.
2016-03-06 16:01:50 +03:30
Syrus Akbary
70b6cbdf22 Merge pull request #90 from gwind/relay-PageInfo
change page_info to fit relay's limitation
2016-03-01 15:17:01 -08:00
Syrus Akbary
e6f229ffb9 Fixed django_connection defaults 2016-02-12 19:13:21 -08:00
Syrus Akbary
56e1b2b638 Fixed default in DjangoConnection 2016-02-12 18:59:17 -08:00
Syrus Akbary
e05b9ea79d Fixed raw_sql tracking 2016-02-12 18:59:02 -08:00
Syrus Akbary
50ed91326a Fixed tests. Improved sql debugging with params 2016-02-05 18:59:23 -08:00
Syrus Akbary
342511cda0 Merge branch 'master' of github.com:graphql-python/graphene 2016-02-05 18:30:08 -08:00
Syrus Akbary
314703d7b5 Improved querying and slicing in DjangoConnectionFields and inherited. Fixed #108 2016-02-05 18:27:27 -08:00
Syrus Akbary
c5b15cec2f Removed the collision with django-debug-toolbar tracking. #108 2016-02-04 14:23:59 -08:00
Syrus Akbary
7b06e01cb3 Fixed ClassTypes when returned as instance. Fixed #105 2016-02-04 13:47:03 -08:00
Syrus Akbary
31eae0aee3 Improve Django field conversion real-life tests 2016-02-04 09:25:18 -08:00
Syrus Akbary
e9e51a0bd4 Merge pull request #100 from graphql-python/features/enum
Add Enum type
2016-02-02 20:13:20 -08:00
Syrus Akbary
9f57b459ec Fixed tests on source 2016-02-02 19:07:34 -08:00
Syrus Akbary
141beb0364 Merge pull request #102 from graphql-python/features/source
Added source argument in Fields
2016-02-02 19:05:30 -08:00
Syrus Akbary
a66f6f2990 Added source argument to Fields. Fixed #101 2016-02-02 19:00:36 -08:00
Syrus Akbary
cb812958a2 Added maybe_func utility 2016-02-02 18:52:00 -08:00
Syrus Akbary
b3693e3702 Added support for sqlalchemy choice 2016-02-01 14:02:38 -08:00
Syrus Akbary
7aa7c5a7bf Added support for mapping Django Fields with choices to Enum types. Fixed #95 2016-02-01 13:54:37 -08:00
Syrus Akbary
407b9ea550 Added Enum class type 2016-02-01 13:28:52 -08:00
Markus Padourek
d971fbb4dc Update to use partial instead of lambda function 2016-02-01 18:50:30 +00:00
Markus Padourek
e7b5358604 Fix UnionType resolver
Fixes #98
2016-02-01 15:57:28 +00:00
Syrus Akbary
235a24e966 Added support for deprecated fields using deprecation_reason. Fixed #93 2016-01-28 10:22:44 -08:00
Jian Li
14fbfaa427 change page_info to fit relay's limitation 2016-01-26 20:35:12 +08:00
Syrus Akbary
96c1726407 Added SQLAlchemy documentation and fixed installs 2016-01-23 14:40:08 -08:00
Syrus Akbary
bc6240d378 Improved connection resolver from list 2016-01-22 22:30:25 -08:00
Syrus Akbary
b86b5a7385 Merge branch 'refs/heads/master' into sqlalchemy 2016-01-22 21:18:35 -08:00
Syrus Akbary
b281bff226 Added global_id method to Nodes 2016-01-22 21:18:20 -08:00
Syrus Akbary
6f7e00af95 Improved query support 2016-01-22 19:21:50 -08:00
Syrus Akbary
017f6ae2a1 Updated SQLAlchemy integration in graphene 2016-01-22 18:31:27 -08:00
Syrus Akbary
961cb1ad83 Merge branch 'refs/heads/master' into sqlalchemy 2016-01-22 10:55:57 -08:00
Syrus Akbary
a0ac884bb2 Set clientMutationId to be camelCase as defined by the graphql relay specification. Fixed #86 2016-01-22 10:42:21 -08:00
Syrus Akbary
f29fe5c8fd Fixed inheritance from abstract types. Fixed #84 2016-01-21 12:39:45 -08:00
Tomek Główka
2e20cd8059 Fixed NodeField object_type string name argument. 2016-01-15 01:49:25 +01:00
Syrus Akbary
112006c211 Fixed PEP8 errors 2016-01-13 18:48:30 -08:00
Syrus Akbary
2acd8691cf Improve imports if not django_filters installed. Improved Django command fixing warning in Django 1.8+ 2016-01-13 18:30:46 -08:00
Syrus Akbary
20a493b9d1 Fixed double underscore converter 2016-01-11 17:27:20 +01:00
Syrus Akbary
f68763b822 Fixed many to many relations in Django model 2016-01-11 17:13:25 +01:00
Syrus Akbary
84dbc58115 Improved Django Compatibility. Added graphql_schema command tests #73 2016-01-03 18:51:02 +01:00
Syrus Akbary
70a4bd13c1 Fixed non-removed code from django filters and some PEP8 errors 2016-01-02 21:35:36 +01:00
Syrus Akbary
69062aa6d1 Improved PEP8 syntax and order imports 2016-01-02 21:19:15 +01:00
Syrus Akbary
e1145b88fb Improved resolvers in Django 2016-01-02 21:13:54 +01:00
Syrus Akbary
33c58f6cfa Improved default field getter and improved relay connection resolver 2016-01-02 21:04:27 +01:00
Adam Charnock
b44bae115d Adding test to reproduce bug whereby the FilterConnectionResolver does not correctly traverse relationships 2015-12-29 16:57:41 +00:00
Adam Charnock
58421cda14 Merge remote-tracking branch 'graphql/master' into feature/django 2015-12-29 13:30:05 +00:00
Syrus Akbary
062c0f9ed5 Merge pull request #73 from lightning18/dump-schema
Implement Django command for dumping schema.json
2015-12-18 19:24:22 +01:00
Kevin Abiera
73c04f22c8
Implement Django command for dumping schema.json
* Implement Django `./manage.py graphql_schema`

* Required to have 'graphene.django.contrib' in INSTALLED_APPS setting

* Introduces two new optional settings GRAPHENE_SCHEMA and
  GRAPHENE_SCHEMA_OUTPUT

* GRAPHENE_SCHEMA for the Django app containing the schema

* GRAPHENE_SCHEMA_OUTPUT for the output file (defaults to schema.json)

* Use `./manage.py graphql_schema -h` for help in command line
2015-12-18 20:57:24 +08:00
Kevin Abiera
6c0bc4c545
Add support for GenericIPAddressField 2015-12-12 22:16:20 +08:00
Syrus Akbary
c7026329d3 Moved django filter tests 2015-12-12 00:54:51 -08:00
Syrus Akbary
8eaa2cfc49 Fixed compatibility with Django 1.6, 1.7, 1.8 and 1.9 2015-12-12 00:51:31 -08:00
Syrus Akbary
35d78320e8 Simplified filter in types and fields. All tests passing 2015-12-11 23:39:41 -08:00
Syrus Akbary
b4f7df3c9d Fixed argument getter in django filters tests 2015-12-11 15:43:22 -08:00
Syrus Akbary
689db2c70e Fixed incompatible syntax in Python 2.7 2015-12-11 11:03:49 -08:00
Syrus Akbary
cdfe7bd33e Merge branch 'refs/heads/master' into feature/adam-django 2015-12-11 10:59:55 -08:00
Syrus Akbary
9dcd7986b8 Improved testing on fields 2015-12-11 10:53:05 -08:00
Syrus Akbary
2eea03cb62 Improved name in Field. Could be an Argument 2015-12-11 10:42:10 -08:00
Syrus Akbary
930f084912 Fixed DjangoDebugPlugin. Improved Django views 2015-12-10 22:11:43 -08:00
Syrus Akbary
c8f4c13822 Improved plugin execution 2015-12-09 19:44:35 -08:00
Syrus Akbary
b3b440f837 Merge branch 'refs/heads/features/plugins-autocamelcase' into features/django-debug 2015-12-09 19:28:43 -08:00
Syrus Akbary
dca435a220 Improved plugin system 2015-12-09 19:26:46 -08:00
Syrus Akbary
dd5b26e6ed Improved debug plugin structure 2015-12-06 16:51:37 -08:00
Syrus Akbary
bd35fcee6c Merge branch 'refs/heads/features/plugins-autocamelcase' into features/django-debug 2015-12-06 16:39:32 -08:00
Syrus Akbary
cd5d9b8eea Improved plugin structure based on @adamcharnock suggestions 2015-12-06 16:34:47 -08:00
Syrus Akbary
730de3f289 Merge branch 'refs/heads/master' into features/plugins-autocamelcase
Conflicts:
	graphene/core/types/argument.py
2015-12-06 16:04:44 -08:00
Syrus Akbary
2724025a5b Improved ScalarTypes code 2015-12-06 15:53:56 -08:00
Syrus Akbary
37a454b831 Renamed BaseType to InstanceType for code clarity 2015-12-06 15:49:54 -08:00
Syrus Akbary
9e1dd8e314 Merge branch 'refs/heads/master' into features/plugins-autocamelcase
Conflicts:
	graphene/core/schema.py
2015-12-06 15:43:57 -08:00
Syrus Akbary
5e708cc919 Improved tests. Improved schema.type getter. Remove duplicated Scalar code 2015-12-06 15:32:31 -08:00
Syrus Akbary
9ea10f562c Fixed lint errors 2015-12-06 14:37:44 -08:00
Syrus Akbary
c9e7f67ff9 Improved logic in GroupNamedType 2015-12-06 14:36:47 -08:00
Syrus Akbary
a153a01f6b Improved debug using plugin structure 2015-12-06 03:59:44 -08:00
Adam Charnock
3d4f593300 DjangoFilterConnectionField now extends ConnectionField, as DjangoConnectionField is now deprecated 2015-12-06 10:38:28 +00:00
Syrus Akbary
2ad5bc203a Merge branch 'refs/heads/features/plugins-autocamelcase' into features/django-debug 2015-12-06 02:37:21 -08:00
Syrus Akbary
12e4e2c006 Added Plugins structure. Added option in schema for auto camel case or not. 2015-12-06 02:35:17 -08:00
Adam Charnock
93e758dc13 Reverting previous commit following comments by @syrusakbary 2015-12-06 10:08:10 +00:00
Syrus Akbary
ec3f292593 Refactored arguments and fields logic 2015-12-06 01:51:03 -08:00
Syrus Akbary
21dffa4aa8 Moved fields to a named group 2015-12-06 01:34:56 -08:00
Syrus Akbary
fae376cbb0 Moved arguments to a named group 2015-12-06 01:01:23 -08:00
Adam Charnock
880807dd2f Replacing django-filter detection with GRAPHENE_ENABLE_FILTERING setting
Also moving GRAPHENE_ORDER_BY_FIELD into settings.py which
centralises use of django settings and their default values
2015-12-05 13:06:44 +00:00
Adam Charnock
0f35f4de8d Correcting definition of 2015-12-05 11:20:48 +00:00
Adam Charnock
66189be4a9 Filtering now available on nodes without defining fields 2015-12-05 11:15:17 +00:00
Adam Charnock
afd7aa8d72 Merge branch 'master' into feature/django 2015-12-05 09:10:38 +00:00
Adam Charnock
bfd43bc995 Flake8 fixes 2015-12-05 09:03:19 +00:00
Adam Charnock
1988519536 Fixes to how singledispatch is imported 2015-12-05 09:01:11 +00:00
Syrus Akbary
2f6fb89f23 Fixed List, NonNull accessors as functions instead of properties 2015-12-04 19:51:44 -08:00
Syrus Akbary
ee19445290 Improved queryset getter for use .count instead of len 2015-12-04 19:28:20 -08:00
Adam Charnock
bbbf688449 Renaming order -> order_by (and fixing assert_not_orderable()) 2015-12-04 21:39:55 +00:00
Adam Charnock
f616b597ac Updating form converter method names to make more sense 2015-12-04 18:55:05 +00:00
Adam Charnock
3a23c1f940 Filtering options will now be read from the destination node's Meta data 2015-12-04 18:41:20 +00:00
Adam Charnock
b4b42db73e Updating imports to work when singledispatch is available natively 2015-12-04 17:48:33 +00:00
Adam Charnock
c93492bacb pep8 fixes 2015-12-04 17:03:29 +00:00
Adam Charnock
818b910991 Now supports django 1.9 2015-12-04 15:46:48 +00:00
Adam Charnock
c42d4a763d Removing debug line 2015-12-04 14:10:31 +00:00
Adam Charnock
79e1b1c996 Removing unused imports 2015-12-04 14:10:06 +00:00
Adam Charnock
e7d7fad068 Remove django app loading which is no longer required post merge 2015-12-04 13:58:39 +00:00
Adam Charnock
7d2ec21855 Merge branch 'master' into feature/django 2015-12-04 13:58:00 +00:00
Adam Charnock
713e148f29 Work in progress on loading django models for tests 2015-12-04 13:57:01 +00:00
Syrus Akbary
3586fdfb77 Improvex syntax 2015-12-04 02:41:47 -08:00
Syrus Akbary
bee0af1125 Improved django debug 2015-12-04 02:34:12 -08:00
Syrus Akbary
28414955a2 Improved resolver function decorators 2015-12-03 23:41:28 -08:00
Syrus Akbary
967a9d2d03 Fixed old DjangoConnectionField usage 2015-12-03 23:23:32 -08:00
Syrus Akbary
14439155ee Initial version debug schema in django 2015-12-03 22:22:49 -08:00
Syrus Akbary
0fa7f5c9aa Improved tests 2015-12-03 21:49:10 -08:00
Syrus Akbary
f4cfd7dc8a Improved package imports 2015-12-03 20:50:14 -08:00
Adam Charnock
be6b2bf290 Adding comments to filter_for_reverse_field() 2015-12-04 01:57:43 +00:00
Adam Charnock
64ec0ca94f Adding support for filtering on to-many fields 2015-12-03 23:13:37 +00:00
Adam Charnock
ed8eac9cdf removing stray commented line 2015-12-03 21:16:09 +00:00
Adam Charnock
6e07ef0c38 Ordering parameter now called 'order' rather than 'o'
This can be customsied via the GRAPHENE_ORDER_BY_FIELD setting,
or by extending GrapheneFilterSet.

I'm open to this being called 'order_by'.
2015-12-03 21:07:44 +00:00
Adam Charnock
375dfcbcc2 Fixing flake8 errors 2015-12-03 20:48:29 +00:00
Adam Charnock
fb45a83925 Moving django-filter dependent code into graphene.contrib.django.filter
Graphene should now run fine without django-filter. Tests will
also run without django-filter. However, I'm leaving it as a
requirement in setup.py's `tests_require` setting as testing
without it is probably not to be encouraged.
2015-12-03 20:01:37 +00:00
Adam Charnock
3709f9450b Refactoring filterset creation logic
I have moved it from `DjangoFilterConnectionField` and pushed it
down into `FilterConnectionResolver` where I think it makes
more sense for it to live.

I have also pulled out `get_filtering_args_from_filterset()` as
a utility method.
2015-12-03 19:22:23 +00:00
Adam Charnock
70024ed0eb Fixes for python 2.7 & PyPy 2015-12-03 18:21:28 +00:00
Adam Charnock
70cedc046f Adding support for filtering by global ID
This is supported for AutoFields, OneToOneFields, and ForeignKey.
I have also added the GrapheneFilterSet base class. This provides
customsiations needed for Graphene. However, making developers
tie their FilterSets to Graphene would not be ideal as it would
prevent their use elsewhere. I therefore wrap any FilterSets
provided to Graphene with this additional functionality.

See `setup_filterset()` for how this is done. Such FilterSets
are also created by `custom_filterset_factory()` (in times
when a filterset is implicitly required via the `fields`
or `order_by` params passed to `DjangoFilterConnectionField`.
2015-12-03 17:55:41 +00:00
Adam Charnock
463c1f98df Relocating UUID form field import code from converter.py to form_converter.py 2015-12-03 13:37:29 +00:00
Adam Charnock
49258827f8 DjangoFilterConnectionField now accepts fields, order_by, and extra_filter_meta 2015-12-03 13:32:43 +00:00
Adam Charnock
7bfeb086a4 Adding filter tests 2015-12-03 12:52:15 +00:00
Adam Charnock
b9f93918c8 Simplifying get_filterset_kwargs() as ImproperlyConfigured cannot be raised 2015-12-03 12:50:00 +00:00
Adam Charnock
930f7179d0 Adding tests for SimpleQuerySetConnectionResolver 2015-12-03 12:08:22 +00:00
Adam Charnock
e270792674 No need to create a Schema in test_fields.py 2015-12-03 11:42:08 +00:00
Adam Charnock
0c7be5c86e pep8 fixes 2015-12-03 11:30:14 +00:00
Adam Charnock
d959cf5a84 Adding tests for DjangoFilterConnectionField 2015-12-03 11:09:34 +00:00
Adam Charnock
4a087ecb24 Adding tests for form field conversion 2015-12-03 10:46:43 +00:00
Adam Charnock
a5d73ac211 pep8 fixes 2015-12-03 10:07:21 +00:00
Adam Charnock
6e63e7b42d Work on Django integration as per #48
Discussion can be found here:
https://github.com/graphql-python/graphene/issues/48

Original gist can be found here:
https://gist.github.com/adamcharnock/ad051b419d4c613d40fe
2015-12-03 10:05:59 +00:00
Syrus Akbary
d251a52442 Fixed Python3 import error 2015-12-02 23:54:45 -08:00
Syrus Akbary
df9dd33c74 Fixed Python3 errors 2015-12-02 23:48:40 -08:00
Syrus Akbary
9b839f19e5 Fixed lint errors 2015-12-02 23:46:49 -08:00
Syrus Akbary
b417a65f19 Fixed options tests 2015-12-02 23:42:22 -08:00
Syrus Akbary
f5837ac4f3 Improved classtypes django support 2015-12-02 23:36:51 -08:00
Syrus Akbary
5b3000f734 Improved classtypes relay support 2015-12-02 22:47:37 -08:00
Syrus Akbary
8abcaff02b Improved classtypes core support 2015-12-02 21:11:24 -08:00
Syrus Akbary
398f7da24c Added FieldsClassType inheritance 2015-12-02 20:44:02 -08:00
Syrus Akbary
afc5e2720b Added NonNull, List definitions to ClassTypes 2015-12-02 20:28:53 -08:00
Syrus Akbary
3363f588fe First working version class types 2015-12-02 20:11:28 -08:00
Syrus Akbary
e78936c424 Fixed tests 2015-12-02 01:33:41 -08:00
Syrus Akbary
5686008660 Removed unused empty class 2015-12-01 21:16:53 -08:00
Syrus Akbary
9a198c8c86 Added abstract ObjectType definition. Fixed #55 2015-11-30 23:14:41 -08:00
Jeremy Feinstein
9a0b33ca77 Fixing it up to use the declarative API 2015-11-25 20:31:49 -05:00
Syrus Akbary
7340d80fa6 Changed type resolver function name to _resolve_type. Fixed #50 2015-11-25 11:33:32 -08:00
Syrus Akbary
a0d8b7162a Remove blinker dependency 2015-11-24 23:57:27 -08:00
Syrus Akbary
fe860774e8 Fixed return ConnectionType instance in ConnectionField resolver 2015-11-22 16:04:14 -08:00
Syrus Akbary
c28b046606 Added DjangoConnection to the public 2015-11-21 19:04:58 -08:00
Syrus Akbary
79c7d070db Fixed isort 2015-11-21 18:47:40 -08:00
Jeremy Feinstein
487543206c Adding support for sqlalchemy 2015-11-21 15:21:40 -05:00
Syrus Akbary
137ba49868 Removed LazyMap 2015-11-21 10:58:49 -08:00
Syrus Akbary
c521e181c8 Simplified Django grapheme types removing LazyMap 2015-11-21 10:53:42 -08:00
Syrus Akbary
732b1aec1b Update Connections 2015-11-20 16:12:11 -08:00
Syrus Akbary
b1e0c3b533 Merge branch 'master' of github.com:syrusakbary/graphene 2015-11-20 08:31:59 -08:00
Syrus Akbary
3921e417ee Fixed django connection or list field. Fixed #43 2015-11-20 08:31:53 -08:00
Syrus Akbary
d50fb33660 Fixed arg count compatibility in Python3 2015-11-19 20:13:41 -08:00
Syrus Akbary
0d4164648f Fixed instance getter using _root. 2015-11-19 20:00:10 -08:00
Syrus Akbary
d6a5269f0b Added support for old behavior of get_node 2015-11-19 19:57:39 -08:00
Syrus Akbary
f69665dcd8 Flake8 improvements and README update 2015-11-19 19:17:02 -08:00
Syrus Akbary
3712542566 Fixed PEP8 syntax 2015-11-19 08:37:15 -08:00
Syrus Akbary
b91ae4b0fb Added subscription support. Fixed #35 2015-11-19 08:37:15 -08:00
Syrus Akbary
4a591354f1 Wrap or not wrap. Root is the question 2015-11-19 08:37:03 -08:00
Syrus Akbary
42df4b6227 Merge branch 'master' of github.com:graphql-python/graphene 2015-11-18 17:54:42 -08:00
Syrus Akbary
fca0ab4f4c Added schema str representation 2015-11-18 17:53:11 -08:00
Jon Rosebaugh
a79a76d3b9 Add the info parameter (ResolveInfo) to get_node() calls.
This allows request_context (or any other ResolveInfo data) to be used while getting nodes.
For example, some data might need to be hidden based on the user's authorization; you would use info.request_context for this.

Fixes #34.
2015-11-17 23:44:01 -05:00
Syrus Akbary
a970d99b69 Fixed flake8 syntax 2015-11-17 17:35:19 -08:00
Syrus Akbary
266dd5efe0 Fixed relay connections/edges field mapping. Improved testing 2015-11-17 17:25:18 -08:00
Syrus Akbary
00c9cc95d4 Improved test syntax 2015-11-16 19:49:40 -08:00
Syrus Akbary
24cd190f95 Added support for UnionTypes 2015-11-16 19:48:51 -08:00
Syrus Akbary
d2ca8a96a9 Fixed node id fetching when cannot decode. Fixed #14 2015-11-15 01:13:56 -06:00
Syrus Akbary
34d6d07fc3 Improved tests 2015-11-15 00:52:22 -06:00
Syrus Akbary
83589a21b8 Merge branch '0.4.0' of github.com:graphql-python/graphene into 0.4.0 2015-11-15 00:25:11 -06:00
Syrus Akbary
d8ca3c089a Cleaned tests 2015-11-13 19:51:37 -08:00
Syrus Akbary
bebdf5cf9b Refactored decorators into utils 2015-11-13 19:44:01 -08:00
Syrus Akbary
dfc2bc4ac3 Improved tests 2015-11-13 19:38:06 -08:00
Syrus Akbary
5282627537 Rewrite imports to be relative instead of absolute 2015-11-13 18:59:02 -08:00
Syrus Akbary
f4a8d53409 Remove unused code. Add more tests 2015-11-13 18:45:11 -08:00
Jake
57ba5e71f9 Remove redundant tests & fix tox. 2015-11-13 17:15:42 -05:00
Jake
4e08819094 Merge remote-tracking branch 'graphql-python/0.4.0' into use-graphql-django-view 2015-11-13 17:08:12 -05:00
Jake
77a588a5b1 Fix handling of root value to be like Schema.execute. 2015-11-13 17:00:04 -05:00
Jake
5a1e014b9a Use graphql-django-view to handle GraphQLView 2015-11-13 16:53:35 -05:00
Syrus Akbary
9548d6932c Merge branch 'refs/heads/master' into 0.4.0
Conflicts:
	graphene/contrib/django/tests/test_views.py
	graphene/contrib/django/views.py
2015-11-13 11:52:28 -08:00
Monte Mishkin
e48598f4e6 added check for content-type "application/graphql" in django view 2015-11-12 23:41:01 -08:00
Syrus Akbary
cc8a494753 Improved arguments construction 2015-11-12 23:21:58 -08:00
Syrus Akbary
ae667f3915 Reuse objecttype fields 2015-11-12 23:18:17 -08:00
Syrus Akbary
1956c1fb03 Added NonNull and List to Types 2015-11-11 22:35:03 -08:00
Syrus Akbary
bf168e7b12 Use new syntax for fields and arguments 2015-11-11 22:16:37 -08:00
Syrus Akbary
a2ab008ead Fixed lint errors 2015-11-11 21:54:45 -08:00
Syrus Akbary
7073208517 Django integration finished 2015-11-11 21:46:26 -08:00
Syrus Akbary
a55222e107 Merge branch '0.4.0-cov' of github.com:graphql-python/graphene into 0.4.0-cov 2015-11-11 18:06:39 -08:00
Syrus Akbary
cf657b365c Improved django support 2015-11-11 17:33:37 -08:00
Syrus Akbary
b0f2b4dd55 Improved relay 2015-11-11 17:33:23 -08:00
Syrus Akbary
2fed5c7e4a Improved fields 2015-11-11 02:21:25 -08:00
Syrus Akbary
cfba52e6f3 Improved lazy type resolvers 2015-11-11 02:12:17 -08:00
Syrus Akbary
bdcd533bf9 Fixed tests 2015-11-11 00:55:15 -08:00
Syrus Akbary
862fa6f312 Fixed argument types 2015-11-10 23:40:05 -08:00
Syrus Akbary
41648b5a94 Improved relay integration 2015-11-10 22:57:22 -08:00
Syrus Akbary
28d89a44f1 Improved mutations, tests and overall integration. 2015-11-10 22:16:05 -08:00
Syrus Akbary
6f87720fc1 Improved tests and coverage 2015-11-10 17:50:11 -08:00
Syrus Akbary
b474010060 Added LazyType 2015-11-10 11:54:20 -08:00
Syrus Akbary
6ad668fe38 Fixed tests 2015-11-10 11:52:29 -08:00
Syrus Akbary
3c65deb313 In work version graphene new types 2015-11-10 01:29:38 -08:00
Syrus Akbary
9bab0d9d6f Improved fields resolver 2015-11-09 20:42:56 -08:00
Syrus Akbary
afe8614753 First types implementation 2015-11-06 01:13:28 -08:00
Syrus Akbary
2f0bd7cf7c Revert "Improved fields hash, eq methods"
This reverts commit 6a377be665.
2015-11-05 00:27:17 -08:00
Syrus Akbary
842d11515e Changed from field_name to attname for field attribute name 2015-11-05 00:14:03 -08:00
Syrus Akbary
6a377be665 Improved fields hash, eq methods 2015-11-04 23:37:13 -08:00
Syrus Akbary
a7f3b77eae Simplified schema code 2015-11-03 21:58:34 -08:00
Syrus Akbary
b6df2d881d Improved function calling 2015-11-03 21:48:13 -08:00
Syrus Akbary
898329c240 Improved resolve_type function using partials 2015-11-03 21:41:06 -08:00
Syrus Akbary
d46e957863 Improved syntax. Added autolinter. Added automatic flake8 checker in tests. Fixed #17 2015-10-31 14:02:22 -07:00
Syrus Akbary
2d55d89047 Improved testing coverage. Removed unused logic 2015-10-29 23:27:41 -07:00
Syrus Akbary
55e2027dbb Improved schema type resolvers 2015-10-29 22:33:43 -07:00
Syrus Akbary
88196103f6 Fixed import 2015-10-28 20:35:44 -07:00
Syrus Akbary
ee3279e12b Added caching to travis tests 2015-10-28 01:34:51 -07:00
Syrus Akbary
e82c680fd1 Added support for Enum Python data structure 2015-10-28 01:27:32 -07:00
Syrus Akbary
d7e1d9c598 Refactored utils 2015-10-28 01:13:56 -07:00
Syrus Akbary
f4c1e711cc Improved arguments received by proxying keys to snake_case. Added relay mutations 2015-10-27 23:17:09 -07:00
Syrus Akbary
bd30bbb322 Fixed field type when parent object type is a inputtype 2015-10-27 22:27:18 -07:00
Syrus Akbary
129999d41a Improved types as containers 2015-10-27 00:17:27 -07:00
Syrus Akbary
2958cc18af Uncommented signals 2015-10-26 02:38:07 -07:00
Syrus Akbary
2bab94d72f Added InputObjectType and InputObjectField 2015-10-26 02:37:07 -07:00
Syrus Akbary
ea5207d025 Changed from mutation->is_mutation interface->is_interface 2015-10-26 02:27:45 -07:00
Syrus Akbary
b377eb6230 Fixed Python3 errors 2015-10-26 01:59:38 -07:00
Syrus Akbary
bc3d176b4e Improved Mutations Input args 2015-10-25 22:30:35 -07:00
Syrus Akbary
2648a2300b First working version of mutations 2015-10-25 22:05:09 -07:00
Syrus Akbary
9e101898f1 Merge branch 'refs/heads/master' into 1.0
Conflicts:
	graphene/core/fields.py
2015-10-25 20:21:06 -07:00
Syrus Akbary
fdb1bb30bc Remove unused field types 2015-10-25 20:20:15 -07:00
Syrus Akbary
7d5987742a Get rid of memoize in all field definitions. Improved #15 2015-10-25 20:10:22 -07:00
Syrus Akbary
842103d8f7 Merge branch 'refs/heads/master' into 1.0 2015-10-25 20:02:24 -07:00
Syrus Akbary
c408c233ea Improved syntax 2015-10-25 20:02:12 -07:00
Syrus Akbary
69de7241ab Added field description based on function doc 2015-10-25 19:49:28 -07:00
Syrus Akbary
23ef63e60e Simplified instance field getter 2015-10-25 16:35:22 -07:00
Syrus Akbary
c45417d5f0 Fixed connection data with wrapped resolver 2015-10-23 01:50:27 -07:00
Syrus Akbary
464002c2db Improved relay resolvers 2015-10-20 21:35:56 -07:00
Syrus Akbary
526d34d009 Fixed exclude_fields when is a tuple 2015-10-19 23:13:48 -07:00
Syrus Akbary
84fcb3eac9 Used Graphene types for relay Connection and Edges 2015-10-19 22:52:35 -07:00
Syrus Akbary
752cd77652 Improved field resolving if instance is not wrapped 2015-10-19 22:28:09 -07:00
Syrus Akbary
fadf3664c0 Refactored django function to utils 2015-10-18 19:43:58 -07:00
Syrus Akbary
bd0ec6dc14 Improved Relay types 2015-10-16 01:23:57 -07:00
Syrus Akbary
633f72cfe9 Added is_type_of functionality 2015-10-16 00:25:40 -07:00
Syrus Akbary
440a981750 Improved field overwriting in Django mapped models 2015-10-15 23:37:08 -07:00
Syrus Akbary
cafcd89e57 Simplified how NodeIDField is managed. Improved tests 2015-10-15 23:26:20 -07:00
Syrus Akbary
71c6022b9e Simplified relay fields code 2015-10-15 19:38:27 -07:00
Syrus Akbary
f8bfb0aa3c Merge branch 'refs/heads/features/resolver_tags'
Conflicts:
	tests/core/test_types.py
2015-10-15 19:17:25 -07:00
Syrus Akbary
2900ed66ad Improved type resolver. Refactored django utils 2015-10-15 19:13:38 -07:00
Syrus Akbary
7e5de3fb4f Fixed tests 2015-10-14 22:24:23 -07:00
Syrus Akbary
bfd7cb9535 Fixed get_node_type function 2015-10-14 22:11:37 -07:00
Syrus Akbary
e693f9b4dc Fixed field hash 2015-10-14 21:53:57 -07:00
Syrus Akbary
14298f1c56 Fixed some tests. Updated graphql-core to 0.1a4 version 2015-10-14 21:50:33 -07:00
Syrus Akbary
86927b2add Added visibility to DjangoInterface 2015-10-14 15:12:38 -07:00
Syrus Akbary
3f8ac7f851 Added Decimal field support (mapping to FloatField until graphql-core implements Decimal type) 2015-10-14 13:49:58 -07:00
Syrus Akbary
979dd0f498 Improved django execute view 2015-10-14 11:33:20 -07:00
Syrus Akbary
40b88bc87b Added support for resolver tagging. Fixed #6 2015-10-13 19:16:42 -07:00
Syrus Akbary
625c6da282 Merge pull request #11 from mbetz08/master
Django 1.6 compatibility for views
2015-10-12 20:50:20 -07:00
Syrus Akbary
32e4a21403 Improved fields inheritance in ObjectTypes 2015-10-12 20:36:46 -07:00
Mickie Betz
3ebb33be6d Django 1.6 compatibility for views 2015-10-12 22:22:46 -05:00
Syrus Akbary
0a42dcea02 Improved Django 1.6 compatibility. Fixed #10 2015-10-12 19:40:20 -07:00
Syrus Akbary
63f320e92b Added support for custom executor settings 2015-10-10 17:35:32 -07:00
Syrus Akbary
2b6a253b78 Updated to work with the last version of graphql-core supporting field ordering 2015-10-10 17:23:40 -07:00
Syrus Akbary
6eb1a48cb2 Improved overall testing coverage 2015-10-10 14:56:18 -07:00
Syrus Akbary
b511563ccc Removed map_type until the last version of graphql-core is on PyPI 2015-10-10 00:18:18 -07:00
Syrus Akbary
4e8fd488ff Updated to work with last version of graphql-relay 2015-10-10 00:09:14 -07:00
Syrus Akbary
ea95ca2b0c Fixed field ordering adding reverse related fields at the end 2015-10-09 23:15:07 -07:00
Syrus Akbary
97224c6083 Fixed foreign key, oneToOne resolve 2015-10-09 22:55:15 -07:00
Syrus Akbary
042325192a Added ability to set up a custom graphql executor. Fixed #7. Added automatic field ordering as default 2015-10-09 22:39:29 -07:00
Syrus Akbary
cf3a32b50a Improved field naming 2015-10-09 22:10:09 -07:00
Syrus Akbary
0bc0218032 Improved fields ordering. Thanks @leebyron for pointing this!
Not everything yet fixed. Have to fix too in graphql-core/relay
2015-10-08 23:24:21 -07:00
Syrus Akbary
fbd9465e57 Use last version of graphql-core. Fixed introspection #3 2015-10-08 17:30:46 -07:00
Syrus Akbary
f9a0f18b0d Fixed local_fields with fields when Extending from A non abstract Django model 2015-10-06 01:05:01 -07:00
Syrus Akbary
0843499306 Improved field description converter from Django fields 2015-10-06 00:49:13 -07:00
Syrus Akbary
fe510dc686 Completed Python3 Compatibility! 2015-10-05 23:06:49 -07:00
Syrus Akbary
b58269ce72 Improved Python3 integration 2015-10-05 22:30:05 -07:00
Syrus Akbary
948da46fcd Changed field attr naming from null to required 2015-10-05 20:42:24 -07:00
Syrus Akbary
cf09066787 Fixed ManyToMany relations mapping in Django Models 2015-10-03 18:21:47 -07:00
Syrus Akbary
dd799483b0 Added NodeTypeField 2015-10-03 17:34:55 -07:00
Syrus Akbary
25eca8776a Added ability to skip fields in runtime 2015-10-03 16:48:18 -07:00
Syrus Akbary
2f3bfdf863 Improved Django fields testing 2015-10-03 13:51:45 -07:00
Syrus Akbary
d47f1d544e Improved django GraphQL view testing 2015-10-03 13:27:19 -07:00
Syrus Akbary
5b415a1de6 Improved Django view exception handling 2015-10-03 12:24:51 -07:00
Syrus Akbary
47bd3d3926 Removed global env from grapheme 2015-10-03 12:23:39 -07:00
Syrus Akbary
a1c7d3e3de Simplified unused code 2015-10-03 03:59:24 -07:00
Syrus Akbary
855cee2f34 Added custom GraphQLSchema 2015-10-03 02:42:56 -07:00
Syrus Akbary
b0e3b3a3af Improved Django GraphQL view error handling 2015-10-03 02:10:03 -07:00
Syrus Akbary
dcd8edb59a Improved Django Connection resolver. Added exclude_fields option to Django Types 2015-10-03 01:47:55 -07:00
Syrus Akbary
52cb1715d3 Added LazyMap for django resolvers 2015-10-03 00:03:38 -07:00
Syrus Akbary
701c49db26 Added automatic snake casing to camel casing conversion in field names 2015-10-02 22:45:13 -07:00
Syrus Akbary
176696c1ac Improved syntax using pep8 style guide 2015-10-02 22:17:51 -07:00
Syrus Akbary
587f05e1d7 Removed unnecessary get_global_schema legacy code 2015-10-01 09:34:32 -07:00
Syrus Akbary
0aba625140 Fixed Django field convert bug pointed by @jhgg 2015-10-01 09:22:29 -07:00
Syrus Akbary
2ba0a62a6c Refactored is_node into relay utils 2015-10-01 02:40:21 -07:00
Syrus Akbary
c945df6064 Completed Django support. Improved tests. Changed schema behavior 2015-10-01 01:54:52 -07:00
Syrus Akbary
72c88a19e5 Removed unused schema 2015-09-30 01:09:37 -07:00
Syrus Akbary
e14f1fdd34 Removed resolved printing. 2015-09-29 23:52:36 -07:00
Syrus Akbary
1e8746830e Fixed tests with django starwars 2015-09-29 23:50:23 -07:00
Syrus Akbary
a7774f0be4 Fixed issues with relay and django models 2015-09-29 23:34:59 -07:00
Syrus Akbary
e89eb3456e Improved Django mapping 2015-09-29 18:25:56 -07:00
Syrus Akbary
ee090b92bd Merge branch 'refs/heads/master' into django 2015-09-29 02:39:03 -07:00
Syrus Akbary
8274fcc5d9 Added introspect method to the schema 2015-09-29 02:38:50 -07:00
Syrus Akbary
80094f45c2 Refactored basic schema code. Make it faster and cleaner 2015-09-29 02:32:58 -07:00
Syrus Akbary
2faa8223e8 Used LazyNativeField for NodeField 2015-09-29 01:18:32 -07:00
Syrus Akbary
18e3ef8698 Created LazyField. Abstracted the Django connection into it. 2015-09-28 23:50:42 -07:00
Syrus Akbary
ac940b9309 Improved Django integration with relations 2015-09-28 23:29:10 -07:00
Syrus Akbary
76147d7c26 Improved Django model conversion 2015-09-28 01:51:51 -07:00
Syrus Akbary
2e8707aee6 First working version with Django. 2015-09-28 00:34:25 -07:00
Syrus Akbary
c79097879d Improved ObjectType instances 2015-09-27 20:38:44 -07:00
Syrus Akbary
311209760d Refactored code allowing multiple schemas at the same time. 2015-09-27 20:19:33 -07:00
Syrus Akbary
eafc9a102e Improved tests and schema definition. 2015-09-26 03:36:00 -07:00
Syrus Akbary
1b7caac39b First working version with relay 💪 2015-09-25 23:25:10 -07:00
Syrus Akbary
e9cf8616ba Improved app_label logic 2015-09-25 19:54:14 -07:00
Syrus Akbary
1ec2f5a4c3 Added app_label 2015-09-25 19:41:11 -07:00
Syrus Akbary
9a84d595a1 First relay version 2015-09-25 16:35:17 -07:00
Syrus Akbary
931d0ddb1c First working version of Graphene 😃 2015-09-24 02:11:50 -07:00