Skip to content
New issue

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

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

Already on GitHub? # to your account

Restore multiline resolver doc comments after #3243 #3428

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

StevenACoffman
Copy link
Collaborator

@StevenACoffman StevenACoffman commented Dec 10, 2024

In #3243, an unintentional change altered how resolver doc comments were rewritten, such that multiline doc comments would only have their first line prefixed with //, causing them to no longer compile.

For instance:

// This is very important resolver
// It will delete the entire universe, all of time and space
        func (r *mutationResolver) DeleteEverything(ctx context.Context, areYouSure bool) ( *graphql1.DeleteEverythingMutation,  error){

Would become this:

// This is very important resolver
 It will delete the entire universe, all of time and space
        func (r *mutationResolver) DeleteEverything(ctx context.Context, areYouSure bool) ( *graphql1.DeleteEverythingMutation,  error){

and no longer compile.

This PR will hopefully restore the old behavior and alter a test so we notice if it fails again.

6b9e40e#diff-86ed98359ce927135cf803c4ac9d4f5de75a42a54d574971f12e86dfbdef9380R75

Signed-off-by: Steve Coffman steve@khanacademy.org

Signed-off-by: Steve Coffman <steve@khanacademy.org>
@coveralls
Copy link

Coverage Status

coverage: 73.399% (-0.03%) from 73.431%
when pulling 74babe1 on multiline_comments
into 910f51b on master.

@StevenACoffman
Copy link
Collaborator Author

@csilvers This should fix the issue.

@StevenACoffman StevenACoffman merged commit 53e39c6 into master Dec 10, 2024
18 checks passed
@StevenACoffman StevenACoffman deleted the multiline_comments branch December 10, 2024 15:19
@@ -159,6 +159,7 @@ func (m *Plugin) generatePerSchema(data *codegen.Data) error {
continue
}
structName := templates.LcFirst(o.Name) + templates.UcFirst(data.Config.Resolver.Type)
// TODO(steve): Why do we need to trimLeft "\" here? Some bazel thing?
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hailyngx @clayne11 Do you remember why this trimLeft is here?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants