由於GraphQL的出現,部分開發者想將既有的後端RESTful架構遷移成GraphQL Server,但GraphQL需要花較多時間學習,且開發者可能不清楚該從何下手。 本論文提出了由RESTful遷移至GraphQL的遷移方法,以RESTful架構的校園二手市集平台為範例,並依照本論文所提出的遷移方法將原本現有的RESTful架構之API需求進行遷移。透過分析將該後端架構另外實際遷移成GraphQL Server,在最後實驗比較後端RESTful Server及GraphQL Server兩者的請求API之效能。並分別針對RESTful API及GraphQL API的響應時間、回傳資料量大小及API端點與響應時間之關係圖進行分析。
Due to the appearance of GraphQL, some developers want to migrate the existing back-end RESTful architecture to GraphQL Server, but GraphQL needs to take a lot of time to learn, and developers may not know where to start. This paper proposes a migration method from RESTful to GraphQL, using the campus second-hand market platform with RESTful architecture as a case study, and migrates the API requirements of the original RESTful architecture according to the migration method proposed in this paper. Through the analysis, the back-end architecture is actually migrated to GraphQL Server, In the final experiment will compared the performance of the request API between RESTful Server and GraphQL Server. And analyze the response time of RESTful API and GraphQL API, the size of returned data, and the relationship between API endpoints and response time