Skip to content

Commit dabb512

Browse files
committed
Docs: Make attribute list clickable
1 parent 3c59b26 commit dabb512

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/usage.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ At minimum, a query and mutation needs to be defined to build a valid schema.
66

77
The following attributes can be used:
88

9-
- `#[Mutation]`
10-
- `#[Query]`
11-
- `#[InputType]`
12-
- `#[Type]`
13-
- `#[Enum]`
14-
- `#[EnumValue]`
15-
- `#[Field]`
16-
- `#[Arg]`
9+
- [#[Mutation]](#mutation-and-query)
10+
- [#[Query]](#mutation-and-query)
11+
- [#[Type]](#type)
12+
- [#[InputType]](#inputtype)
13+
- [#[Enum]](#enum)
14+
- [#[EnumValue]](#enum)
15+
- [#[Field]](#field)
16+
- [#[Arg]](#arg)
1717

1818
See below for more information about each attribute:
1919

20-
### Mutation and query
20+
### #[Mutation] and #[Query]
2121

2222
Mutations and queries can be defined with `#[Mutation]` and `#[Query]`. In order to configure your class as mutation or
2323
query, just add these attributes on class level:
@@ -72,7 +72,7 @@ Both `#[Mutation]` and `#[Query]` attribute can be configured:
7272
| `type` | Set custom return type; it can be:<br/>- A Type (FQCN)<br/>- A `ScalarType` (e.g. `ScalarType::Int`)<br/>- A `ListType` (e.g. `new ListType(ScalarType::Int)`)<br/>- A `NullableType` (e.g. `new NullableType(SomeType::class)`)<br/>- A combination of `ListType` and `NullableType` and a Type FQCN or `ScalarType` <br/>(e.g. `new NullableType(new ListType(ScalarType::String))`) |
7373
| `deprecationReason` | If set, deprecates the mutation or query | |
7474

75-
### InputType
75+
### #[InputType]
7676

7777
Input types can be defined with `#[InputType]`.
7878
In order to configure your class as input type, just add this attribute on class level:
@@ -118,7 +118,7 @@ options).
118118
| `name` | Set custom name of input type (instead of based on class) |
119119
| `description` | Set description of the input type, readable in the GraphQL schema |
120120

121-
### Type
121+
### #[Type]
122122

123123
Types can be defined with `#[Type]`.
124124
In order to configure your class as type, just add this attribute on class level:
@@ -176,7 +176,7 @@ options).
176176
| `name` | Set custom name of type (instead of based on class) |
177177
| `description` | Set description of the type, readable in the GraphQL schema |
178178

179-
### Enum
179+
### #[Enum]
180180

181181
Enums can be defined with `#[Enum]`.
182182
In order to configure your enum class as enum, just add this attribute on class level:
@@ -228,7 +228,7 @@ Each case in the `enum` type can be configured as well, with the `#[EnumValue]`
228228
| `description` | Set description of the enum case, readable in the GraphQL schema |
229229
| `deprecationReason` | If set, deprecates the case | |
230230

231-
### Field
231+
### #[Field]
232232

233233
In `#[Type]` and `#[InputType]`, to define fields, the `#[Field]` attribute can be used.
234234
In order to configure any fields this can be set on constructor property (for `#[InputType]` or `#[Type]`) or
@@ -284,7 +284,7 @@ final readonly class YourInputType
284284
| `type` | Set custom return type; it can be:<br/>- A Type (FQCN)<br/>- A `ScalarType` (e.g. `ScalarType::Int`)<br/>- A `ListType` (e.g. `new ListType(ScalarType::Int)`)<br/>- A `NullableType` (e.g. `new NullableType(SomeType::class)`)<br/>- A combination of `ListType` and `NullableType` and a Type FQCN or `ScalarType` <br/>(e.g. `new NullableType(new ListType(ScalarType::String))`) |
285285
| `deprecationReason` | If set, deprecates the field (`#[Type]` only) | |
286286

287-
### Arg
287+
### #[Arg]
288288

289289
For `#[Mutation]`, `#[Query]` and `#[Type]` methods defined with `#[Field]`, input arguments are read
290290
automatically from the signature.

0 commit comments

Comments
 (0)