Skip to content

Commit

Permalink
Update docs to remove EnumType
Browse files Browse the repository at this point in the history
Docs are out of date for deprecated, `EnumType` - now just `Type`.
  • Loading branch information
oojacoboo authored Dec 14, 2024
1 parent f512f1c commit 34bf4ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions website/versioned_docs/version-7.0.0/type-mapping.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ query users($status: StatusEnum!) {}
```

By default, the name of the GraphQL enum type will be the name of the class. If you have a naming conflict (two classes
that live in different namespaces with the same class name), you can solve it using the `@EnumType` annotation:
that live in different namespaces with the same class name), you can solve it using the `name` argument of the `Type` attribute:

<Tabs
defaultValue="php8"
Expand All @@ -570,9 +570,9 @@ that live in different namespaces with the same class name), you can solve it us
<TabItem value="php8">

```php
use TheCodingMachine\GraphQLite\Annotations\EnumType;
use TheCodingMachine\GraphQLite\Annotations\Type;

#[EnumType(name: "UserStatus")]
#[Type(name: "UserStatus")]
class StatusEnum extends Enum
{
// ...
Expand All @@ -583,10 +583,10 @@ class StatusEnum extends Enum
<TabItem value="php7">

```php
use TheCodingMachine\GraphQLite\Annotations\EnumType;
use TheCodingMachine\GraphQLite\Annotations\Type;

/**
* @EnumType(name="UserStatus")
* @Type(name="UserStatus")
*/
class StatusEnum extends Enum
{
Expand Down

0 comments on commit 34bf4ed

Please sign in to comment.