Commit Graph

488 Commits

Author SHA1 Message Date
Olivia Rodriguez Valdes
3ff6dfb451 Add reduce import 2019-05-30 11:13:42 -04:00
Paul Hallett
b0cba398a1
Merge pull request #647 from dulmandakh/react-16.8.6
bump react to 16.8.6
2019-05-21 14:18:45 +01:00
Dulmandakh
7690c2c002 bump react to 16.8.6 2019-05-20 19:41:25 +08:00
Dulmandakh
49aedf171a bump graphiql to 0.13.0, and rename __debug to _debug due to __ limitations 2019-05-20 17:48:28 +08:00
zorig
ba64bceab0 graphiql version upgrade 2019-05-15 17:22:29 +08:00
Paul Hallett
e26a9f2a44
Merge pull request #631 from graphql-python/fix-628
Fix importing error for GraphQLTestCase
2019-05-13 18:12:22 +01:00
Mel van Londen
865c9535b9
Bugfix: FormMutation was always causing boolean fields to be required (#613)
Bugfix: FormMutation was always causing boolean fields to be required
2019-05-09 11:47:47 -07:00
Paul Hallett
2bf7e7f66d
Fix importing error for GraphQLTestCase 2019-05-08 22:45:28 +01:00
Paul Hallett
0d178b38fb
Merge pull request #609 from acu/fix-connection-field-required
Fix passing required=True to DjangoConnectionField
2019-05-06 12:01:12 +01:00
Paul Hallett
e6ad5887ca
Introduce Black formatting, additional tests 2019-05-02 17:46:35 +01:00
Alexandre Kirszenberg
b49d315a39 4 spaces 2019-05-01 15:49:54 +02:00
Mel van Londen
fb8a129752
Merge pull request #608 from GitRon/feature/base-test-class
Added test class for django api unittests and documentation
2019-04-27 09:16:23 -07:00
David Sanders
6acd917cf7
Drop old Django compatibility code 2019-04-15 05:53:30 -07:00
Olivia Rodriguez Valdes
923585be87 Check none values before data-loading ut 2019-04-11 15:36:44 -04:00
Olivia Rodriguez Valdes
9128889353 Add load-many support 2019-04-11 09:03:17 -04:00
Olivia Rodriguez Valdes
9caa57a7ff Accept source_loader from kwargs in DataLoaderField resolver 2019-04-10 14:16:08 -04:00
Olivia Rodriguez Valdes
581dbe7416 Add tests to DataLoaderField 2019-04-10 11:28:40 -04:00
Olivia Rodriguez Valdes
ee50031cf6 Add DataLoaderField 2019-04-10 11:28:33 -04:00
Ronny Vedrilla
29b8ea8398 Bugfix: FormMutation was always causing boolean fields to be required 2019-04-05 14:27:53 +02:00
Andrew Bettke
a7ee042e9d Merge branch 'master' of https://github.com/graphql-python/graphene-django into fix/enhanced-proxy-model-support 2019-04-01 22:15:16 +13:00
Patrick Arminio
923d8282c7 Fix duplicated ErrorType declaration (#539)
* Add failing test case

* Fix duplicated ErrorType declaration
2019-03-31 12:01:43 +01:00
Jason Kraus
0a5020bee1 Get queryset (#528)
* first attempt at adding get_queryset

* add queryset_resolver to DjangoConnectionField and fix test failures

* cleanup get_queryset API to match proposal as close as possible

* pep8 fix: W293

* document get_queryset usage

* add test for when get_queryset is defined on DjangoObjectType
2019-03-31 12:01:17 +01:00
Gary Donovan
fcc3de2a90 Allow graphql schema export to use a canonical representation (#439)
When we use the `graphql_schema` management command, the output can vary from run to run depending on arbitrary factors (because there is no guarantee made about the order used to output JSON dictionary keys). This makes it difficult to compare two schema's at different points in time.

We address this by including a new `canonical` flag to the command, which uses standard `json.dump` funcitonality to sort dictionary keys and force pretty-printed output.
2019-03-31 11:30:29 +01:00
Alexandre Kirszenberg
8beadc759f Correctly propagate NonNull to inner connection type 2019-03-30 19:43:11 +01:00
Ronny Vedrilla
3c11a980fe Python 2.7 syntax compat 2019-03-29 12:53:18 +01:00
Ronny Vedrilla
b491878c27 * Added test class for django api unittests and documentation how to use it 2019-03-29 11:51:40 +01:00
Andrew Bettke
959e98eeb0 Refactor to use formal to_global_id. 2019-03-28 09:56:10 +13:00
sierreis
d2f8bf730b Test exception when both filterset_class and filter_fields are set 2019-03-27 14:05:42 -04:00
Ronny Vedrilla
d5d0c519ce Replaced a copy-paste error causing one test case not to run 2019-03-27 15:21:15 +01:00
Andrew Bettke
a461e80ee4 Correctly encode / decode for python3+. 2019-03-27 17:56:06 +13:00
Andrew Bettke
83a2ad34cd Encode strings before passing to b64encode. 2019-03-27 17:28:56 +13:00
Andrew Bettke
980142dfcf Fix linting. 2019-03-27 17:24:13 +13:00
Andrew Bettke
36ac5626e9 Adds enhanced support for proxy models. 2019-03-27 17:09:25 +13:00
sierreis
132c4cb9d4 Fixed so that GrapheneFilterSetMixin is used with any provided filterset_class 2019-03-25 23:45:14 -04:00
sierreis
4d905a46ac Fixed flake8 lint error 2019-03-25 10:03:54 -04:00
sierreis
5c191b9062 Add support for filterset_class meta parameter
* Allow for use of either filter_fields or filterset_class
* Add tests to check that the behavior is similar to filter_fields
* Add documentation to show how to make use of the parameter
2019-03-25 00:38:49 -04:00
Adam Johnson
ea2cd9894f Always use HTTPS for CDN files (#498)
* Always use HTTPS for CDN files

There's no point using insecure, deprecated HTTP even if the current page is on HTTP.

* add integrity and crossorigin attributes
2019-03-19 20:34:10 +00:00
Jonathan Kim
297b807f96
Merge pull request #508 from danpalmer/graphiql-no-querystring
Improve Security of GraphiQL
2019-03-16 11:30:32 +00:00
Jonathan Kim
ce8fa7f9f2 Fix lint error 2019-03-09 22:39:04 +01:00
Alejandro Nunez Capote
b62eb0347c removing django dependency 2019-03-07 08:54:07 -05:00
Olivia Rodriguez Valdes
97b2cd08f2 Verify ALL_FIELDS after camel case 2019-03-06 16:07:37 -05:00
Olivia Rodriguez Valdes
365dfe0f14 Update tests 2019-03-04 15:34:09 -05:00
Olivia Rodriguez Valdes
e7705fe21b Add camel case to error field 2019-03-04 15:33:59 -05:00
Olivia Rodriguez Valdes
0ee2327d60 Change verification order 2019-03-04 11:31:31 -05:00
Olivia Rodriguez Valdes
b93bbb9546 Add form param to comments 2019-03-04 09:03:52 -05:00
Olivia Rodriguez Valdes
4996a72725 Set model dependency in conversion 2019-03-04 08:52:59 -05:00
Olivia Rodriguez Valdes
41222c1565 Fix lint errors 2019-03-04 08:51:21 -05:00
Olivia Rodriguez Valdes
f3660b3f30 Update tests 2019-03-03 15:34:01 -05:00
Olivia Rodriguez Valdes
6ea5e2bbaf Update converter 2019-03-03 15:33:11 -05:00
Olivia Rodriguez Valdes
0541b713e9 Merge remote-tracking branch 'origin/master' into convert-form-choice 2019-03-01 16:45:04 -05:00
Olivia Rodriguez Valdes
8e2f626f35 Set conversion to enum 2019-03-01 16:38:47 -05:00
Olivia Rodriguez Valdes
e99d22510f Merge remote-tracking branch 'origin/master' into convert_form_choice#7 2019-03-01 15:54:55 -05:00
Olivia Rodriguez Valdes
ece1677cb2 Merge branch 'permission-to-type#5' of github.com:revolico/graphene-django into permission-to-type#5 2019-03-01 14:43:34 -05:00
Olivia Rodriguez Valdes
1e1e849f4a Rename to DjangoField 2019-03-01 14:34:54 -05:00
Alejandro Nunez Capote
603c950bcb Merge branch 'master' into permission-to-type#5 2019-03-01 14:31:15 -05:00
alejandronunez
88209cff58
Merge pull request #4 from revolico/permissions-to-fields#3
Permissions to fields#3
2019-03-01 14:16:04 -05:00
Olivia Rodriguez Valdes
e7a4538a3e Merge branch 'permissions-to-fields#3' into permission-to-type#5
# Conflicts:
#	graphene_django/fields.py
2019-03-01 12:48:37 -05:00
Olivia Rodriguez Valdes
8912175cc5 Set permissions as optional 2019-03-01 12:44:52 -05:00
Olivia Rodriguez Valdes
76cbad1fb2 Change DjangoField to PermissionField 2019-03-01 12:42:29 -05:00
Olivia Rodriguez Valdes
ad2342a08b Verify there is a viewer on context 2019-03-01 12:40:54 -05:00
Olivia Rodriguez Valdes
696464691f Merge branch 'permissions-to-fields#3' into permission-to-type#5 2019-03-01 09:29:17 -05:00
Olivia Rodriguez Valdes
063cced585 Update tests 2019-03-01 09:28:14 -05:00
Olivia Rodriguez Valdes
3eee96c9ad Update get_unbound_function import 2019-02-28 22:48:00 -05:00
Olivia Rodriguez Valdes
7272d34950 Pass field_permissions as variable to __set_as_nullable__ method 2019-02-28 17:51:30 -05:00
Olivia Rodriguez Valdes
ef3cd81959 Reorder field_permissions 2019-02-28 17:21:26 -05:00
Olivia Rodriguez Valdes
1adb13dff8 Set function as unbound 2019-02-28 16:35:01 -05:00
Olivia Rodriguez Valdes
10d28ba5d0 Refactor DjangoObjectType 2019-02-28 15:30:36 -05:00
Olivia Rodriguez Valdes
9a645f3ef1 Refactor DjangoObjectType 2019-02-28 15:29:00 -05:00
Olivia Rodriguez Valdes
1382e93b28 Merge branch 'permissions-to-fields#3' into permission-to-type#5
# Conflicts:
#	graphene_django/fields.py
2019-02-28 15:18:46 -05:00
Olivia Rodriguez Valdes
c518ddbf4b Set raise_exception as arg 2019-02-28 15:15:46 -05:00
Olivia Rodriguez Valdes
b5dc9aea59 Merge branch 'permissions-to-field' into permissions-to-fields#3 2019-02-28 15:11:29 -05:00
Olivia Rodriguez Valdes
eca43192b0 Change get_unbound_function importation 2019-02-28 15:10:22 -05:00
Olivia Rodriguez Valdes
6cc6492732 Merge branch 'permissions-to-field' into permissions-to-fields#3 2019-02-28 15:06:21 -05:00
Olivia Rodriguez Valdes
d14af48866 Change naming 2019-02-28 15:05:39 -05:00
Olivia Rodriguez Valdes
cc7bab38df Merge branch 'permissions-to-field' into permissions-to-fields#3 2019-02-28 14:58:38 -05:00
Olivia Rodriguez Valdes
ad7497de10 Refactor PermissionField 2019-02-28 14:58:20 -05:00
Olivia Rodriguez Valdes
f357d7ebfb Remove field resolver 2019-02-28 10:48:30 -05:00
Olivia Rodriguez Valdes
6e087c4bd4 Remove change 2019-02-27 16:11:25 -05:00
Olivia Rodriguez Valdes
114202b970 Force push 2019-02-27 16:11:14 -05:00
Olivia Rodriguez Valdes
142f5141ea Add permission to class 2019-02-19 13:31:19 -05:00
Olivia Rodriguez Valdes
715fbbe1dd Update permission to type 2019-02-19 13:02:06 -05:00
Olivia Rodriguez Valdes
7c936d9565 Merge branch 'permission-to-type#5' into permission-to-type 2019-02-18 15:22:54 -05:00
Olivia Rodriguez Valdes
da26750acf Merge branch 'permissions-to-fields#3' into permission-to-type#5 2019-02-18 15:22:38 -05:00
Olivia Rodriguez Valdes
7d643f3b71 Get bound 2019-02-18 15:15:13 -05:00
Olivia Rodriguez Valdes
7b86824afa Mixing DjangoObjectType and DjangoPermissionObjectType 2019-02-18 15:00:35 -05:00
Olivia Rodriguez Valdes
120b94edd2 Merge branch 'permissions-to-fields#3' into permission-to-type#5
# Conflicts:
#	graphene_django/fields.py
2019-02-18 11:12:02 -05:00
Olivia Rodriguez Valdes
813b31e965 Get unbound function to resolver 2019-02-15 16:19:15 -05:00
Olivia Rodriguez Valdes
b8eef4731a Set default resolver 2019-02-15 15:19:04 -05:00
Olivia Rodriguez Valdes
b3d418253b Add test to converter 2019-01-07 09:03:49 -05:00
Olivia Rodriguez Valdes
9e007b962e Add converter to graphene_django 2019-01-07 09:03:37 -05:00
Olivia Rodriguez Valdes
106d3e063d Add test to permission type 2019-01-07 08:25:19 -05:00
Olivia Rodriguez Valdes
56a4ae9194 Merge branch 'permissions-to-fields#3' into permission-to-type#5 2019-01-07 07:46:21 -05:00
Olivia Rodriguez Valdes
0b34a215ad Set resolver as class attr 2019-01-07 07:46:00 -05:00
Olivia Rodriguez Valdes
beba130657 Refactoring permission field 2019-01-07 07:44:20 -05:00
Olivia Rodriguez Valdes
d1391db45a Add permission type 2019-01-06 11:13:44 -05:00
Olivia Rodriguez Valdes
1fe99a0787 Merge remote-tracking branch 'origin/permissions-to-fields#3' into permission-to-type#5 2019-01-04 15:25:56 -05:00
Olivia Rodriguez Valdes
4c6e7209c3 Add viewer management 2019-01-04 15:02:50 -05:00
Olivia Rodriguez Valdes
9e62c71d72 Add PermissionObjectType 2019-01-04 14:59:32 -05:00
Olivia Rodriguez Valdes
a314511ea4 Change PermissionField to DjangoPermissionField 2019-01-04 14:25:08 -05:00
Olivia Rodriguez Valdes
d773e4232a Add tests to DjangoPermissionField 2019-01-04 14:24:55 -05:00
Olivia Rodriguez Valdes
72b8493632 Remove import 2019-01-04 14:24:44 -05:00
Olivia Rodriguez Valdes
5f17d6e025 Add PermissionField 2019-01-04 14:24:15 -05:00
Olivia Rodriguez Valdes
e150c419d1 Add tests to DjangoFormMutation 2019-01-03 11:32:36 -05:00
Olivia Rodriguez Valdes
37b90de09c Remove mirror of input fields 2019-01-03 11:32:18 -05:00
Syrus Akbary
f76f38ef30
Merge pull request #512 from kalekseev/schema-to-stdout
Provide a way to dump schema to stdout.
2018-09-09 22:49:53 +02:00
Dan Palmer
2b08e59bea
Revert to default query execution behaviour
The only security risk here is persuading a user to execute a mutation,
which is probably not a big risk. To mitigate this risk and still keep
the same UX (that is so valuable), would require more work than is
proportionate for this PR.
2018-09-09 21:44:30 +01:00
Dan Palmer
040f6aa10e
Document, including whether fields are required 2018-09-09 19:01:00 +01:00
Dan Palmer
e6b21594d7
Add some documentation to DjangoDebug 2018-09-09 18:59:28 +01:00
Konstantin Alekseev
85527e1f94 Provide a way to dump schema to stdout. 2018-09-08 15:34:48 +03:00
Syrus Akbary
f4bbae29df
Updated version to 2.2.0 2018-09-05 23:20:25 +02:00
Syrus Akbary
21bad6105c
Merge pull request #472 from wsantos/master
Exclude id from mutation for create operations
2018-09-05 13:20:38 +02:00
Jay Hale
0314931f12 Removed Django < 1.11 compatibility checks from tests 2018-09-04 13:15:04 -04:00
Jay Hale
f8dff38e29 Remove unnecessary compat utility for Django < 1.11 2018-09-04 13:15:04 -04:00
Jay Hale
d8bdda94df Add back support for django-filter < 2 2018-09-04 13:15:04 -04:00
Jay Hale
dc0c2900d1 Making GrapheneFilterSetMixin compatible with django_filter 2 2018-09-04 13:15:04 -04:00
Dan Palmer
7e8f6dbd4e
Change quotes to improve some syntax highlighting 2018-08-30 20:58:00 +01:00
Dan Palmer
e50e12bc9f
Move GraphiQL's JS into a separate file for ease of CSP 2018-08-30 20:36:26 +01:00
Dan Palmer
24ebc20bf4
Fix comment 2018-08-30 20:32:38 +01:00
Dan Palmer
d1b734f07d
Allow the user to see the query before prompting
This also allows the introspection query through so that the user can
edit with intellisense before being prompted.
2018-08-30 20:31:39 +01:00
Dan Palmer
9a5b3556d3
Special case reloads as allowed if we can 2018-08-30 19:48:38 +01:00
Dan Palmer
0d8f9db3fb
Pass options from the fragment, not the template context 2018-08-30 19:48:21 +01:00
Dan Palmer
3755850c2e
Use the fragment for the URL 2018-08-30 19:47:48 +01:00
Dan Palmer
219005952a
Don't execute on GET for GraphiQL
We can also now return GraphiQL earlier in the request handling.
2018-08-30 19:29:33 +01:00
Waldecir Santos
d4a9c2bb89 Fix tests. 2018-07-22 23:53:58 +01:00
Waldecir Santos
c1bd3c4c15 Exclude id from mutation, useful for create operations. 2018-07-22 23:35:11 +01:00
Syrus Akbary
dc561c68c4 Updated version to 2.1.0 2018-07-19 16:52:24 -07:00
Syrus Akbary
54ef52e1c6 Reformatted files using black 2018-07-19 16:52:24 -07:00
Syrus Akbary
1755948768
Update __init__.py 2018-06-08 11:53:00 -07:00
Syrus Akbary
763665f2f6 Updated version to 2.1rc0 2018-06-05 15:21:11 -07:00
Syrus Akbary
27a7c0e299 Added support for FilePathField 2018-06-05 14:39:51 -07:00
Syrus Akbary
a9d819e1f7 Removed repeated function 2018-06-05 14:24:41 -07:00
Syrus Akbary
10d2f3eea7 Commented the input form class, for now 2018-06-05 14:17:07 -07:00
Syrus Akbary
364d4f8f41 Merge branch 'master' into form_mutations 2018-06-05 13:32:45 -07:00
Syrus Akbary
546a82b7ec Updated time imports 2018-06-05 13:32:32 -07:00
Syrus Akbary
bb6da28008 Merge branch 'master' into form_mutations 2018-06-05 13:31:29 -07:00
Syrus Akbary
a9e5beb9eb Merge branch 'master' into form_mutations
# Conflicts:
#	graphene_django/forms/converter.py
#	graphene_django/forms/tests/test_converter.py
2018-06-05 13:23:39 -07:00
Syrus Akbary
883d1778d5
Merge pull request #336 from urbandove/django2
support Django 2 + in tests
2018-06-05 13:02:09 -07:00
Syrus Akbary
7563045d75
Merge pull request #290 from DouglasConnect/fix-distinct-bug
Fix distinct bug
2018-06-05 12:57:19 -07:00
Syrus Akbary
a65f786ba4 Fixed requirement 2018-06-05 12:31:25 -07:00
Syrus Akbary
33c6fdf5ab Added graphql-core min version to requirements 2018-06-05 01:24:53 -07:00
=
43c0c99136 fix lint error 2018-04-15 00:21:53 -04:00
=
b331319aea Fix merge conflicts 2018-04-15 00:12:49 -04:00
Syrus Akbary
a480a39713
Merge pull request #326 from pizzapanther/drf-serializer-update
DRF Serializer update
2018-03-29 23:22:14 -07:00
Syrus Akbary
70dffa94e7
Merge pull request #212 from maqquettex/fix_cbv_inheritance
Inheritance support for GraphQLView (class attributes)
2018-03-29 23:19:29 -07:00
Syrus Akbary
d2c1e7c87b
Merge pull request #391 from mongkok/test-custom-meta-setdefault
Test DjangoObjectType custom meta .setdefault()
2018-03-29 21:02:35 -07:00
Daniel Bachler
c32340662c Remove print statement 2018-03-28 12:28:58 +02:00
Syrus Akbary
fdb7d5a253
Merge pull request #395 from mbarrientos/drf-list-serializers
Fixes #371 - Support ListSerializer fields in SerializerMutation
2018-03-14 23:31:10 -07:00
Daniel Bachler
34f5978446 Move distinct check code to merge_querysets again 2018-02-28 17:52:27 +01:00
Daniel Bachler
4d41160379 Update resolve method signature to 2.0 style in new test 2018-02-28 17:45:25 +01:00
Daniel Bachler
e05fbcc1b3 Fix failing unit test by handling cases where a connection is resolved involving a query with inner join and distinct that is then filtered and would be combined with a filtered queryset that is not distinct. 2018-02-28 14:41:47 +01:00