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

release/slash: opt(GraphQL): filter existence queries on GraphQL side instead of using @filter(type) (#7757) #7760

Merged
merged 1 commit into from Apr 28, 2021

Commits on Apr 28, 2021

  1. opt(GraphQL): filter existence queries on GraphQL side instead of using

    @filter(type) (#7757)
    
    For the existence queries we used to do:
     query {\n  Cuisine_1(func: eq(Cuisine.name, \"yaMqnmHeov\")) @filter(type(Cuisine)) {\n uid \n  } \n}
    
    The filter operation can be very heavy on dgraph.type as it may store millions of nodes. A better query could be like this:
     query {\n  Cuisine_1(func: eq(Cuisine.name, \"yaMqnmHeov\")) {\n uid dgraph.type \n  } \n}
    
    This PR removes the above @filter operation from the existence query and uses the suggested alternate query which is lightweight.
    The existence check operation is path critical and this fix is expected to add some performance improvement along with preventing OOM.
    
    (cherry picked from commit 690fbbe)
    NamanJain8 committed Apr 28, 2021
    Copy the full SHA
    1dffc32 View commit details
    Browse the repository at this point in the history