File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,27 @@ In the previous example, the generated `resolve` config of the `something` field
116116
117117# # Type & Args auto-guessing
118118
119+ # ## @Field type auto-guessing when defined on a property with a type hint
120+
121+ The type of the `@Field` annotation can be auto-guessed if it's defined on a property with a type hint.
122+ If the property has a usable type hint this is used and no futher guessing is done.
123+
124+ For example :
125+
126+ ` ` ` php
127+ /**
128+ * @GQL\T ype
129+ */
130+ class MyType {
131+ /**
132+ * @GQL\F ield
133+ */
134+ protected string $property;
135+ }
136+ ` ` `
137+
138+ In this example, the type `String!` will be auto-guessed from the type hint of the property.
139+
119140# ## @Field type auto-guessing from Doctrine ORM Annotations
120141
121142Based on other Doctrine annotations on your fields, the corresponding GraphQL type can sometimes be guessed automatically.
You can’t perform that action at this time.
0 commit comments