-
Notifications
You must be signed in to change notification settings - Fork 228
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
REGRESSION: default resolvers #234
Comments
Hello, Thanks for reporting the issue. Can you share more about how you relied on the |
Up until the latest version (2.2.1) graphene-sqlalchemy did not use any custom resolvers. We have something built on top of graphene that uses attrs_dict = {
"Meta": {
"model": self.db_model,
"default_resolver": self.default_field_resolver,
"only_fields": only_fields or (),
"exclude_fields": exclude_fields or (),
}
}
graphene_type = type(
self.db_model.__name__, (SQLAlchemyObjectType,), attrs_dict
) |
Everything is fine and our |
Would you mind explaining what type of logic you are putting in |
In our case we had a few places where we had a resolver on a type but did not explicitly have the field on the type. The type was defined as a SQLAlchemyObjectType and the field(s) in question were not in the excluded fields list. Our resolvers were defined on the type and required extra logic before returning and could not simply be returned from the database. One example was images that were being stored in AWS S3 with presigned urls that had an expiration date. |
I experienced this regression too, where my |
Can anyone share an actual repro of the bug? thank you |
@ticosax looks good to me |
Apologies for the late reply. I was on vacation and did not have time to look into this until this week. Thanks @ticosax for the repro. I figured out what's going on. It's indeed a serious regression :/ Cheers |
@davidmoss @ticosax @dtamez Here is the fix: #241 @rafales Does my PR fix your issue? It seems that the repro posted by @ticosax is different from your original issue with |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics referencing this issue. |
This commit: 9a0f740
started setting resolver on fields. Providing a resolver for all fields breaks usage of
default_resolver
(meta param to ObjectType), which our project was using. This introduced a silent error, where our default resolver was not called.The text was updated successfully, but these errors were encountered: