-
Notifications
You must be signed in to change notification settings - Fork 194
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
entgql: added Description() for adding meta data to a field #364
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @Albert-Gao.
The next thing is to add it to the gqlparser/ast.Definition.
@a8m thanks for the comments, how to do this please? I checked the file, but do not know how to link the added the field to this FieldConfig.Descrption. What I am missing here please? Thanks :) |
Hello @Albert-Gao, you need to add Lines 208 to 231 in a1f3cb4
The latest thing, don't forget to merge annotation if we have more than one on the entity: Lines 463 to 471 in a1f3cb4
|
Thanks, @giautm added, please check. |
@@ -90,7 +90,7 @@ func (Todo) Edges() []ent.Edge { | |||
func (Todo) Annotations() []schema.Annotation { | |||
return []schema.Annotation{ | |||
entgql.RelayConnection(), | |||
entgql.QueryField(), | |||
entgql.QueryField().Description("This the todo item"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
3051d9f
to
bee18da
Compare
No description provided.