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

Inconsistent Documentation Regarding Resolver #1264

Open
leench opened this issue Aug 16, 2024 · 2 comments
Open

Inconsistent Documentation Regarding Resolver #1264

leench opened this issue Aug 16, 2024 · 2 comments

Comments

@leench
Copy link

leench commented Aug 16, 2024

I noticed in the Defining a Schema that it mentions using regular methods for resolvers. However, during testing, I encountered an error: NotImplementedError: Non static resolves are not supported yet.

Additionally, I found in the What's new in V1 section that it states:
resolve_xxx(self, ...) - support resolve with (self) is dropped in favor of pydantic build-in functionality

Does this mean the old resolver method is no longer supported? If so, does the documentation need updating to reflect this change?

@MisaoDev
Copy link

MisaoDev commented Sep 9, 2024

It looked like a cool feature. I figure they might have dropped it in favor of using the context object? (Not sure if you can get the other attributes from it)

But the main thing for me is.. it could save you from adding @staticmethod to every resolver 😅 That's 1 less line every time.

@jleclanche
Copy link

The documentation is def a bit lackluster - it says dropped in favour of built-in functionality but doesn't say which / link to documentation.

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

No branches or pull requests

3 participants