laravel-graphql
laravel-graphql copied to clipboard
Types Specified in Schema section of config without names are loaded incorrectly
If you load a schema like this:
$schema = GraphQL::schema([
'query' => [
'examplesCustom' => ExamplesQuery::class
],
'mutation' => [
'updateExampleCustom' => UpdateExampleMutation::class
],
'types' => [
Type1::class,
Type2::class
]
]);
The second type will be loaded with a name of "1" because in Folklore\GraphQL.php:70 the type loader doesn't check if the name variable is numeric before passing it to addType