Skip to content

Commit 0cc17ce

Browse files
authored
Merge pull request #764 from mfn/mfn-remove-method
Properly remove the per-schema `method` key
2 parents 1dec9e6 + f274440 commit 0cc17ce

File tree

5 files changed

+2
-30
lines changed

5 files changed

+2
-30
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ CHANGELOG
2828
- 1 route for each schema + 1 route for the group prefix (default schema)
2929
- If GraphiQL is enabled: 1 route graphiql route for each schema + 1 for the
3030
graphiql group prefix (default schema)
31+
- This also means that the per schema config key `method` (aka HTTP method)
32+
is not supported anymore
3133
- It's now possible to prevent the registering of any routes by making the top
3234
level `route` an empty array or null
3335
- `\Rebing\GraphQL\GraphQL::routeNameTransformer` has been removed

config/config.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
// ExampleType::class,
8585
],
8686
'middleware' => [],
87-
'method' => ['get', 'post'],
8887
],
8988
],
9089

tests/Support/Objects/ExampleSchemaWithMethod.php

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/Unit/NoRoutesRegisteredTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Illuminate\Routing\Router;
88
use Rebing\GraphQL\Tests\Support\Objects\ExampleMiddleware;
99
use Rebing\GraphQL\Tests\Support\Objects\ExampleSchema;
10-
use Rebing\GraphQL\Tests\Support\Objects\ExampleSchemaWithMethod;
1110
use Rebing\GraphQL\Tests\TestCase;
1211

1312
class NoRoutesRegisteredTest extends TestCase
@@ -28,11 +27,9 @@ protected function getEnvironmentSetUp($app): void
2827
'middleware' => [ExampleMiddleware::class],
2928
],
3029
'with_methods' => [
31-
'method' => ['post'],
3230
'middleware' => [ExampleMiddleware::class],
3331
],
3432
'class_based' => ExampleSchema::class,
35-
'class_based_with_methods' => ExampleSchemaWithMethod::class,
3633
'shorthand' => BuildSchema::build('
3734
schema {
3835
query: ShorthandExample

tests/Unit/RoutesTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Illuminate\Support\Collection;
99
use Rebing\GraphQL\Tests\Support\Objects\ExampleMiddleware;
1010
use Rebing\GraphQL\Tests\Support\Objects\ExampleSchema;
11-
use Rebing\GraphQL\Tests\Support\Objects\ExampleSchemaWithMethod;
1211
use Rebing\GraphQL\Tests\TestCase;
1312

1413
class RoutesTest extends TestCase
@@ -32,11 +31,9 @@ protected function getEnvironmentSetUp($app): void
3231
'middleware' => [ExampleMiddleware::class],
3332
],
3433
'with_methods' => [
35-
'method' => ['post'],
3634
'middleware' => [ExampleMiddleware::class],
3735
],
3836
'class_based' => ExampleSchema::class,
39-
'class_based_with_methods' => ExampleSchemaWithMethod::class,
4037
'shorthand' => BuildSchema::build('
4138
schema {
4239
query: ShorthandExample
@@ -108,17 +105,6 @@ public function testRoutes(): void
108105
ExampleMiddleware::class,
109106
],
110107
],
111-
'graphql.class_based_with_methods' => [
112-
'methods' => [
113-
'GET',
114-
'POST',
115-
'HEAD',
116-
],
117-
'uri' => 'graphql_test/class_based_with_methods',
118-
'middleware' => [
119-
ExampleMiddleware::class,
120-
],
121-
],
122108
'graphql.shorthand' => [
123109
'methods' => [
124110
'GET',

0 commit comments

Comments
 (0)