Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to remove EnumType #719

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading