GraphQL is a query language and web application programming interface (API) for client-server architecture. Its advantages include type-safe queries, which allow clients to retrieve the data they require precisely in a single request. As organizations adopt GraphQL for API implementations, it is imperative to understand its challenges and the software community's interests. To achieve this goal, we conducted a five-step mixed-method empirical analysis of 45K StackOverflow questions and answers on GraphQL. In the first step, we derive a reference architecture for the GraphQL ecosystem with five key layers. Second, we used topic modeling based on Latent Dirichlet Allocation (LDA) to automatically identify 14 topics and 47 subtopics. Third, we mapped discussion topics to architecture layers. Fourth, we manually investigate questions on each topic and subtopics to provide additional insight to the GraphQL stakeholders. Finally, we study topic difficulty, popularity, trends, and tradeoffs to provide insights into evolving community interests and challenges. Our results indicate that Client and Server are the top two architectural layers attracting discussion on SO. While earlier discussions on SO focused on building third-party applications consuming GraphQL APIs (i.e., API Integration) released by large organizations, recent trends suggest more organizations implementing APIs using GraphQL servers. Due to difficulty and lack of well-defined solutions, security remains a difficult and low-interest area. However, such a practice can lead to vulnerable APIs.
翻译:GraphQL是一种面向客户端-服务器架构的查询语言与Web应用程序编程接口(API)。其优势包括类型安全的查询机制,允许客户端通过单次请求精确获取所需数据。随着各组织在API实现中采用GraphQL,理解其面临的挑战及软件社区关注点显得尤为重要。为实现这一目标,我们对StackOverflow上45,000条GraphQL相关问答进行了五阶段混合方法实证分析。第一阶段,我们推导出包含五个关键层的GraphQL生态系统参考架构。第二阶段,采用基于潜在狄利克雷分布(LDA)的主题建模方法,自动识别出14个主题与47个子主题。第三阶段,将讨论主题映射至架构层级。第四阶段,通过人工检视各主题及子主题下的问题,为GraphQL利益相关者提供深入洞察。最后,通过分析主题难度、流行度、趋势及权衡关系,揭示社区关注焦点与挑战的演变动态。研究结果表明:客户端与服务器是StackOverflow平台上讨论最集中的两大架构层级。早期讨论主要聚焦于基于大型组织发布的GraphQL API构建第三方应用程序(即API集成),而近期趋势显示更多组织开始采用GraphQL服务器实现API。由于技术难度高且缺乏明确解决方案,安全领域仍是讨论难度大、关注度低的议题,但当前实践可能导致API存在安全漏洞。