Commit Graph

46 Commits

Author SHA1 Message Date
Patrick Arminio
923d8282c7 Fix duplicated ErrorType declaration (#539)
* Add failing test case

* Fix duplicated ErrorType declaration
2019-03-31 12:01:43 +01:00
Syrus Akbary
54ef52e1c6 Reformatted files using black 2018-07-19 16:52:24 -07:00
Syrus Akbary
a480a39713
Merge pull request #326 from pizzapanther/drf-serializer-update
DRF Serializer update
2018-03-29 23:22:14 -07:00
mbarrientos
3793ce17c0 Add support for ListSerializer fields in SerializerMutation 2018-02-13 12:12:50 +01:00
Syrus Akbary
adde400893
Merge pull request #335 from urbandove/master
models.DateField => graphene Date Scalar
2018-02-08 12:14:13 -08:00
Paul Bailey
91a99ee39c serializer update support 2018-02-06 13:37:28 -06:00
Syrus Akbary
c585982a1a
Merge pull request #382 from patrick91/patch-1
Improve ErrorType
2018-02-03 22:25:03 -08:00
Patrick Arminio
6a152820ca
Improve ErrorType
Marks some fields as required and non null, it also prevents to do useless checks on the frontend if using a typed language.
2018-02-01 09:52:16 +00:00
=
1352d4e02b Fix func names 2017-12-18 12:33:42 -05:00
=
65e63026a0 Add tests 2017-12-11 21:23:00 -05:00
=
62c0694901 models.DateField corresponds to graphene Date Scalar 2017-12-05 15:04:29 -05:00
Paul Bailey
6cfd5b2854 added line ending 2017-11-14 22:10:26 +00:00
Paul Bailey
345fe877c4 added ModelSerializer tests 2017-11-13 20:35:00 +00:00
Paul Bailey
c72e7e55eb added ModelSerializer tests 2017-11-13 20:33:12 +00:00
Paul Bailey
75e11a8195 add created field to test 2017-11-13 16:06:07 +00:00
Paul Bailey
e05f41af40 fixed indentation 2017-11-12 23:10:29 +00:00
Paul Bailey
e7391937dd fixes #322, fixed incorrect serializer instance usage 2017-11-10 21:49:48 +00:00
Syrus Akbary
2a73e5e479 Fixed flake 2017-09-01 00:52:57 -07:00
Andy Clayton
c130490b4f ensure SerializerMutation.errors is None on success in 2.x
Upon success the result was correct but also included:

"errors": [
  {
    "message": "User Error: expected iterable, but did not find one
for field <SerializerMutation_Subclass>Payload.errors."
  }
]

This seemed to be due to Payload.errors defaulting to graphene.List
rather than unset or None. Unsure what exactly changed with 2.x to break
this, so I welcome a better fix, but explicitly setting errors to None
also seems easy enough.
2017-08-31 12:37:54 -05:00
Andy Clayton
cc58b91e43 fix SerializerMutation regression for 2.x
72529b7 seems to break SerializerMutation by commenting out support for
input fields. As a result input only ever had a clientMutationId field.
2017-08-31 12:21:50 -05:00
Syrus Akbary
3d58148f03 Code adapted to new resolver API 2017-07-28 09:43:27 -07:00
Syrus Akbary
72529b70bb Fixed all tests and flake issues 2017-07-24 23:42:40 -07:00
Syrus Akbary
48bcccdac2 Improved integration with Graphene 2.0 2017-07-24 22:27:50 -07:00
Jacob Foster
afbe6c90b7 Add nested model mutation tests 2017-07-18 14:02:29 -05:00
Jacob Foster
81a6dff9d0 Update field converter tests 2017-07-18 14:02:28 -05:00
Jacob Foster
ee23638378 Add converters for datetime fields 2017-07-11 13:35:12 -05:00
Jacob Foster
302ea0d3cf Account for nested ModelSerializers 2017-07-11 13:29:30 -05:00
Patrick Arminio
93bbc194bf Add missing new line 2017-06-29 09:59:21 +01:00
Patrick Arminio
5c3306e78d Return empty errors when successful 2017-06-26 18:16:55 +01:00
Patrick Arminio
000ef6c42e Fix result from mutation 2017-06-26 18:03:01 +01:00
Patrick Arminio
1a04d608ed Add support for MultipleChoiceField 2017-06-26 14:32:57 +01:00
Patrick Arminio
510ee9383e Add support for JSONField 2017-06-26 14:28:03 +01:00
Patrick Arminio
0e2c736c74 Add test for image field 2017-06-26 14:26:26 +01:00
Patrick Arminio
66d1875eb7 Fix missing path 2017-06-26 14:25:57 +01:00
Patrick Arminio
b500ffb8b0 Add test for IPAddressField 2017-06-26 14:24:16 +01:00
Patrick Arminio
47c5dfcab7 Add test for FilePathField 2017-06-26 14:23:45 +01:00
Patrick Arminio
772e2d114a Add test for file field 2017-06-26 14:23:17 +01:00
Patrick Arminio
a7c3337903 Add test for duration field 2017-06-26 14:22:38 +01:00
Patrick Arminio
68f6281ec8 Add support for dict field 2017-06-26 14:19:55 +01:00
Patrick Arminio
f747102e35 Add support for rest framework List Field 2017-06-26 12:14:04 +01:00
Patrick Arminio
6de3bbc352 Small test refactor 2017-06-26 12:11:35 +01:00
Patrick Arminio
d10895d9ce Refactor converter 2017-06-26 11:36:48 +01:00
Patrick Arminio
c3899248af Use six.with_metaclass to support python 2.7 2017-06-26 09:19:49 +01:00
Patrick Arminio
14bc1cdb92 Add SerializerMutation base class 2017-06-26 09:19:49 +01:00
Patrick Arminio
2fd3cb032c Fix import on python 2 2017-06-26 09:19:49 +01:00
Patrick Arminio
fb2af7067f Initial implementation of serializer field converter 2017-06-26 09:19:49 +01:00