Azevedo, Isabel de Fátima SilvaMonteiro, Luís Bruno Vieira2022-07-282022http://hdl.handle.net/10400.22/20730As web applications continue to grow, the need for these applications to adapt to the needs of the client is more important. Applications like mobile and web require efficient responses. The search for alternatives to the very popular REST APIs gains more interest. One popular approach is GraphQL. GraphQL addresses both the flexibility and performance concerns that can occur in RESTFul APIs by allowing users to request the data as they need it. With this flexibility, security and performance concerns become more and more relevant. This work aims to explore how can these concerns be answered by analysing queries and deciding if they are safe to be answered or not. Always having in mind that the performance should not be affected. One of the conclusions found is that the implementation of a simpler strategy is fundamental to any GrahQL API since it provides a minimum level of security without compromising performance. However, the use of a more complex approach offers better results, without having any major disadvantage.Com o constante crescimento de aplicações web, a necessidade destas se adaptarem à necessidade dos seus cliente torna-se mais importante. Aplicações mobile e web necessitam de respostas eficientes. A procura de novas alternativas para as populares REST APIs ganha mais interesse. Uma solução popular é GraphQL. GraphQL responde diretamente às questões quer de flexibilidade, quer de performance, que podem ocorrer em RESTFul APIs, permitindo aos seus utilizadores pedir as informações conforme necessitem. Com esta flexibilidade, questões relacionadas com a segurança e performance tornam-se mais relevantes. Este trabalho pretende explorar como é que estas questões podem ser resolvidas através da análise das queries, decidindo se as mesmas são seguras ou não. Tendo sempre em conta que a performance não deve ser afetada. Uma das conclusões obtidas é de que a implementação de uma estratégia mais simples é fundamental pois oferece um nível básico de segurança sem compremeter a performance. Contudo, o use de estratégias mais complexas oferece melhores resultados, sem ter desvantagens claras.engGraphQLQueriesExpensiveCostAnalysisSecurityGraphQL queries: questões de segurança e performancemaster thesis203042050