Skip to content
This repository has been archived by the owner on Feb 10, 2019. It is now read-only.

Types Specified in Schema section of config without names are loaded incorrectly #365

Open
sburba opened this issue Aug 1, 2018 · 0 comments

Comments

@sburba
Copy link

sburba commented Aug 1, 2018

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant