From 6d0bbd03954e52a2312ecb8786dc3a80d25e65c1 Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Wed, 9 Dec 2020 10:24:12 +0100 Subject: [PATCH 1/5] BUGFIX: Set $supportedMediaTypes to application/json Fixes https://github.com/t3n/graphql/issues/29 --- Classes/Controller/GraphQLController.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Classes/Controller/GraphQLController.php b/Classes/Controller/GraphQLController.php index e94e76e..9d54402 100644 --- a/Classes/Controller/GraphQLController.php +++ b/Classes/Controller/GraphQLController.php @@ -51,6 +51,14 @@ class GraphQLController extends ActionController */ protected $requestLogger; + /** + * A list of IANA media types which are supported by this controller + * + * @var string[] + * @see http://www.iana.org/assignments/media-types/index.html + */ + protected $supportedMediaTypes = ['application/json']; + /** * @Flow\SkipCsrfProtection * From f3a6a0623b9f305157245d875258c98505d6dd3b Mon Sep 17 00:00:00 2001 From: Karsten Dambekalns Date: Wed, 9 Dec 2020 12:09:23 +0100 Subject: [PATCH 2/5] Fix style issue --- Classes/Controller/GraphQLController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Controller/GraphQLController.php b/Classes/Controller/GraphQLController.php index 9d54402..a0e6658 100644 --- a/Classes/Controller/GraphQLController.php +++ b/Classes/Controller/GraphQLController.php @@ -54,7 +54,7 @@ class GraphQLController extends ActionController /** * A list of IANA media types which are supported by this controller * - * @var string[] + * @var array * @see http://www.iana.org/assignments/media-types/index.html */ protected $supportedMediaTypes = ['application/json']; From eedb0c5a94ccf3b238bb3406aa1e1858466ad71a Mon Sep 17 00:00:00 2001 From: Johannes Steu Date: Wed, 9 Dec 2020 13:20:10 +0100 Subject: [PATCH 3/5] Update Classes/Controller/GraphQLController.php --- Classes/Controller/GraphQLController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Controller/GraphQLController.php b/Classes/Controller/GraphQLController.php index a0e6658..9d54402 100644 --- a/Classes/Controller/GraphQLController.php +++ b/Classes/Controller/GraphQLController.php @@ -54,7 +54,7 @@ class GraphQLController extends ActionController /** * A list of IANA media types which are supported by this controller * - * @var array + * @var string[] * @see http://www.iana.org/assignments/media-types/index.html */ protected $supportedMediaTypes = ['application/json']; From 58430760a7f5b9c96d5988e315afb6f7d9460ff7 Mon Sep 17 00:00:00 2001 From: Johannes Steu Date: Wed, 9 Dec 2020 13:29:31 +0100 Subject: [PATCH 4/5] Update Classes/Controller/GraphQLController.php --- Classes/Controller/GraphQLController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Classes/Controller/GraphQLController.php b/Classes/Controller/GraphQLController.php index 9d54402..90ce14d 100644 --- a/Classes/Controller/GraphQLController.php +++ b/Classes/Controller/GraphQLController.php @@ -55,6 +55,7 @@ class GraphQLController extends ActionController * A list of IANA media types which are supported by this controller * * @var string[] + * * @see http://www.iana.org/assignments/media-types/index.html */ protected $supportedMediaTypes = ['application/json']; From dd37a824504247339f9e6e0d1c0a8a005b0f8ee2 Mon Sep 17 00:00:00 2001 From: Johannes Steu Date: Wed, 9 Dec 2020 13:32:51 +0100 Subject: [PATCH 5/5] And again ... --- Classes/Controller/GraphQLController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/Controller/GraphQLController.php b/Classes/Controller/GraphQLController.php index 90ce14d..4fe8dd4 100644 --- a/Classes/Controller/GraphQLController.php +++ b/Classes/Controller/GraphQLController.php @@ -54,9 +54,9 @@ class GraphQLController extends ActionController /** * A list of IANA media types which are supported by this controller * - * @var string[] - * * @see http://www.iana.org/assignments/media-types/index.html + * + * @var string[] */ protected $supportedMediaTypes = ['application/json'];