-
-
Notifications
You must be signed in to change notification settings - Fork 464
Open
Labels
discussionRequires input from multiple peopleRequires input from multiple people
Description
Describe the bug
When using native enums, as showcased here https://lighthouse-php.com/master/the-basics/types.html#native-php-definition coupled with https://github.com/BenSampo/laravel-enum
Enum name collisions are not detected when running php artisan lighthouse:validate-schema
Expected behavior/Solution
Validating schema should detect enum name collisions when using native php enums
Steps to reproduce
- install https://github.com/BenSampo/laravel-enum
- create a new enum MyEnum.php
<?php
declare(strict_types=1);
namespace App\Enums;
use BenSampo\Enum\Enum;
class MyEnum extends Enum
{
public const DONE = 'DONE';
} - create a new graphql enum with the same name
enum MyEnum {
DONE
}- run
php artisan lighthouse:validate-schema - Output is
The defined schema is valid.
Output/Logs
Click to expand
# Add in log output/error messages here
Lighthouse Version
4.18.0
Metadata
Metadata
Assignees
Labels
discussionRequires input from multiple peopleRequires input from multiple people