News for hackers. Stuff that matters.
Re:Thinking in GraphQL by santialbo on Thursday October 08, 2015 @12:26PM (#10353790)
and you'll end up with an endpoint that can potentially bomb your datastore

    query User {
      friends {
        friends {
          friends {
            ...
          }
        }
      }
    }
how do you prevent something like this happening on graphQL backed with a series of resolves that query a SQL database?
Re:Thinking in GraphQL by estefan on Thursday October 08, 2015 @12:58PM (#10354017)
Limit recursion with a max depth parameter (sangria)
Re:Thinking in GraphQL by santialbo on Thursday October 08, 2015 @01:12PM (#10354160)
I don't need that many levels to make it explode and you probably don't want to set a very low max depth since it beats the purpose of graphql itself.