GraphQL on Azure: Part 11 – Avoiding DoS Queries

In the previous post in this series we added a new “virtual” field to our GraphQL schema for Post, related:
1 2 3 4 5 6 7 8 9 10 type Post { id: ID! title: String! url: Url! date: Date tags: [String!]! description: String content: String! r…

In the previous post in this series we added a new “virtual” field to our GraphQL schema for Post, related:
1 2 3 4 5 6 7 8 9 10 type Post { id: ID! title: String! url: Url! date: Date tags: [String!]! description: String content: String! related(tag: String): [Post!] } But in doing so, we added a problem, let’s take this query as an example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 query { posts { related { related { related { related { related { related { related { related { title } } } } } } } } } } Oh dear… What’s going to happen here?


Print Share Comment Cite Upload Translate
APA
Posts on LINQ to Fail | Sciencx (2024-03-29T09:36:35+00:00) » GraphQL on Azure: Part 11 – Avoiding DoS Queries. Retrieved from https://www.scien.cx/2022/10/10/graphql-on-azure-part-11-avoiding-dos-queries/.
MLA
" » GraphQL on Azure: Part 11 – Avoiding DoS Queries." Posts on LINQ to Fail | Sciencx - Monday October 10, 2022, https://www.scien.cx/2022/10/10/graphql-on-azure-part-11-avoiding-dos-queries/
HARVARD
Posts on LINQ to Fail | Sciencx Monday October 10, 2022 » GraphQL on Azure: Part 11 – Avoiding DoS Queries., viewed 2024-03-29T09:36:35+00:00,<https://www.scien.cx/2022/10/10/graphql-on-azure-part-11-avoiding-dos-queries/>
VANCOUVER
Posts on LINQ to Fail | Sciencx - » GraphQL on Azure: Part 11 – Avoiding DoS Queries. [Internet]. [Accessed 2024-03-29T09:36:35+00:00]. Available from: https://www.scien.cx/2022/10/10/graphql-on-azure-part-11-avoiding-dos-queries/
CHICAGO
" » GraphQL on Azure: Part 11 – Avoiding DoS Queries." Posts on LINQ to Fail | Sciencx - Accessed 2024-03-29T09:36:35+00:00. https://www.scien.cx/2022/10/10/graphql-on-azure-part-11-avoiding-dos-queries/
IEEE
" » GraphQL on Azure: Part 11 – Avoiding DoS Queries." Posts on LINQ to Fail | Sciencx [Online]. Available: https://www.scien.cx/2022/10/10/graphql-on-azure-part-11-avoiding-dos-queries/. [Accessed: 2024-03-29T09:36:35+00:00]
rf:citation
» GraphQL on Azure: Part 11 – Avoiding DoS Queries | Posts on LINQ to Fail | Sciencx | https://www.scien.cx/2022/10/10/graphql-on-azure-part-11-avoiding-dos-queries/ | 2024-03-29T09:36:35+00:00
https://github.com/addpipe/simple-recorderjs-demo