graphql-python/graphene-mongo

MongoengineConnectionField paging is SLOW!

Closed this issue · 3 comments

I just stood up a MongoDB and started using Graphene-Mongo to serve up the data but am finding MongoengineConnectionField queries to be very slow! They work but lets say I want to do:

{
    users(first: 10){
         edges{
             node{
                  username
                  full_name
                 }
           }
     }
}

That will take probably 5 minutes to execute. If I make my own resolver and just do something like:

Users.objects.limit(5)

It will be completed in milliseconds.

Did I miss something in the documentation? Or is this a known issue and I just have to make my own revolvers for everything?

TIA

I've created a pull request that fixes this issue: #143

@usmcamp0811 : Would you please try with the updated master? I have merged #143
@sostholm 👍

Was also experiencing this issue, the changes in master did the trick for me, thanks!