tfoxy / graphene-django-optimizer

Optimize database access inside graphene queries
MIT License
430 stars 84 forks source link

Prefetch related with named arguments and objects #23

Open NyanKiyoshi opened 5 years ago

NyanKiyoshi commented 5 years ago

Hi @tfoxy, following #22, we are unable to actually know what when we are getting called from: prefetch_related(info, *args[, **kwargs?]) https://github.com/tfoxy/graphene-django-optimizer/blob/1d7032d79bf891aa7842a6ee3d72f860fbf158bd/graphene_django_optimizer/query.py#L241-L250

We could whether have as first or second argument first, last, filter, foo, etc.

We would like to get a **kwargs instead. But we can't both pass *args and **kwargs to prevent any breaking change for any of the optimizer users.

I believe users using the arguments from *args should be still safe if they are properly using the field name... Otherwise, it will break for sure.

What do you think? Could we get such change in and release it as a major change?

maarcingebala commented 5 years ago

Hey @tfoxy, we have a solution for this issue ready. Can we count on some feedback from your side? It would be great, as our project relies on this library and now this issue blocks us from shipping a new feature. I think we can contribute to the library a lot while using it, but we need to make sure that we can get your feedback also or get things merged if we see that they are general problems in the library.

maarcingebala commented 5 years ago

Ping @tfoxy

tfoxy commented 5 years ago

Hi @maarcingebala and @NyanKiyoshi .

I apologize for not paying attention to this library. A few months ago I decided to focus on others things in my life and I haven't done much coding outside of work. I'm also not working with Django anymore so it's hard for me to understand some issues without investing some time with the code.

I saw that I was receiving some emails about issues with this library and I was thinking of adding some collaborators. I've received the email from one of your teammates and I'm willing to transfer the ownership to your organization, as I know you would do a much better work than me at maintaining the repo, as seen by what you did with saleor. I haven't received a response from that email. I'm already transferring the repo to you org. I still have to check how to do it with pypi, travis and codecov.

tfoxy commented 5 years ago

Github is not allowing me to transfer the repo as I "don’t have the permission to create repositories on mirumee". I added you as collaborators for now. We can keep talking through email to coordinate the transfer if you prefer.

maarcingebala commented 5 years ago

Thanks a lot @tfoxy! I think it should be enough for now if we're just collaborators with the write access. We'll reach out to you via email about PyPi.

wodCZ commented 4 years ago

Hi, have you managed to get this working?