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

"type" Argument not working on "Query" objects #296

Open
LucasEsposito opened this issue Jun 14, 2023 · 0 comments
Open

"type" Argument not working on "Query" objects #296

LucasEsposito opened this issue Jun 14, 2023 · 0 comments

Comments

@LucasEsposito
Copy link

LucasEsposito commented Jun 14, 2023

Describe the bug
The class "Query" allows the usage of an argument named type since long time ago. On the latest version, it is still allowed.
However, that argument is not being used at all.
When looking at the code, I notice the value of "type" is still saved, but I can't find any place where it's actually used within the Query class or its parent classes.

To Reproduce
Add the following to a client

class Client(Consumer):
    @get("/api/entities")
    def get_entities(self, typed_query: Query(type=lambda x: x + 'something')):
        ...

Then call it

response = client.get_entities(typed_query="holo")
print(response.request.url)

The result:
http://mydomain.com/api/entities/?typed_query=holo

Expected behavior
The query param value on the url is "holosomething" (instead of just "holo").

Additional context

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

1 participant