Skip to content

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

@LucasEsposito

Description

@LucasEsposito

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions