• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

GraphQL - Famous N+1 query issue

 
Ranch Hand
Posts: 44
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm facing GraphQL (N+1) query problem and it is been clearly explained in the video https://www.youtube.com/watch?v=ld2_AS4l19g&ab_channel=knowthen on how we can solve the problem.

However not sure on the following, Please help me with source code if possible, Thank you so much in advance.

Books returns 4 and query executed 4 times
User returns 8 and query executed 8 times
Department returns 4 and query executed 4 times

only one difference at the end of the schema it is defined as BooksPaged! similarly for others as well

In my Case
a. Books
b. Users
c. Department

query {
 books{
 total  
  users {
    total
    department{
        name
     }
 }
  }
}

Thanks
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic