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

Fix wrap_with_warning call for new tracing module #94

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

engwan
Copy link

@engwan engwan commented Apr 24, 2024

When using the new tracing module, we call wrap_with_warning on the class so we should not make this a private method.

This prevents errors like:

Internal server error: private method `wrap_with_warning' called for BatchLoader::GraphQL:Class

When using the new tracing module, we call wrap_with_warning on the
class so we should not make this a private method
@@ -45,7 +45,6 @@ def self.wrap_with_warning(batch_loader)
warn "DEPRECATION WARNING: using BatchLoader.for in GraphQL is deprecated. Use BatchLoader::GraphQL.for instead or return BatchLoader::GraphQL.wrap from your resolver."
wrap(batch_loader)
end
private_class_method :wrap_with_warning
Copy link
Author

Choose a reason for hiding this comment

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

On line 8 of this file, we call BatchLoader::GraphQL.wrap_with_warning. So we cannot make this a private method.

@engwan
Copy link
Author

engwan commented Apr 24, 2024

@exAspArk @janko this fixes another regression from #91

@janko
Copy link
Contributor

janko commented Apr 24, 2024

@engwan Ah, sorry, I missed that, thanks for the fix 👍🏻

@exAspArk exAspArk merged commit cfe4958 into exAspArk:main Apr 24, 2024
@exAspArk
Copy link
Owner

@engwan nice, thank you! 🙌

I just released the fix in version 2.0.5

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

Successfully merging this pull request may close these issues.

3 participants