Skip to content
This repository was archived by the owner on Feb 10, 2019. It is now read-only.
This repository was 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

Description

@sburba

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions