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
Adam Charnock
93e758dc13
Reverting previous commit following comments by @syrusakbary
2015-12-06 10:08:10 +00: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
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
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
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
9b839f19e5
Fixed lint errors
2015-12-02 23:46:49 -08:00
Syrus Akbary
f5837ac4f3
Improved classtypes django support
2015-12-02 23:36:51 -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
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
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
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
4a591354f1
Wrap or not wrap. Root is the question
2015-11-19 08:37:03 -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
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
5282627537
Rewrite imports to be relative instead of absolute
2015-11-13 18:59:02 -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
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
cf657b365c
Improved django support
2015-11-11 17:33:37 -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
d46e957863
Improved syntax. Added autolinter. Added automatic flake8 checker in tests. Fixed #17
2015-10-31 14:02:22 -07:00
Syrus Akbary
55e2027dbb
Improved schema type resolvers
2015-10-29 22:33:43 -07:00
Syrus Akbary
129999d41a
Improved types as containers
2015-10-27 00:17:27 -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
c408c233ea
Improved syntax
2015-10-25 20:02:12 -07:00
Syrus Akbary
526d34d009
Fixed exclude_fields when is a tuple
2015-10-19 23:13:48 -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
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
2900ed66ad
Improved type resolver. Refactored django utils
2015-10-15 19:13:38 -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
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
6eb1a48cb2
Improved overall testing coverage
2015-10-10 14:56:18 -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