Home / Companies / Wundergraph / Blog / December 2022

December 2022 Summaries

4 posts from Wundergraph

Filter
Month: Year:
Post Summaries Back to Blog
A tutorial on using ChatGPT as an educational chatbot in a Next.js frontend is presented. The tech stack for this integration includes a Next.js frontend, a Node.js/Express API that proxies questions to the OpenAI ChatGPT servers, and a backend-for-frontend (BFF) using WunderGraph, which provides a secure, typesafe JSON-over-RPC API. WunderGraph decouples the frontend from the backend, simplifying maintenance and two-way communication between them. The tutorial covers setting up WunderGraph, defining operations using GraphQL, and building the UI for the chatbot. The final product allows students to type questions into the chatbot, receive answers from ChatGPT, and interact with the bot in a natural way.
Dec 19, 2022 1,906 words in the original blog post.
The new Next.js client is built using the SWR (Server-Side Rendering) library, which provides a more efficient and optimized data fetching experience. The client supports queries, subscriptions, and mutations, with features such as optimistic updates, invalidation of queries after mutations, and support for Server-Side Rendering (SSR). The API is fully typed and uses middleware to add functionality to individual hooks or globally using `SWRConfig`. The new client also works seamlessly with live queries and subscriptions, making it an excellent choice for building high-performance APIs. With the release of SWR 2.0RC, the Next.js client has been rewritten to use SWR, providing a more streamlined experience for developers.
Dec 12, 2022 1,156 words in the original blog post.
The text discusses the comparison between tRPC (TypeScript Remote Procedure Calls) and GraphQL. The author is a fan of tRPC's simplicity but acknowledges that it may not be suitable for large-scale applications or teams with diverse technical backgrounds. In contrast, GraphQL offers more flexibility and scalability, especially when using Fragments to declare data requirements at the component level. However, this comes at the cost of increased complexity and investment in schema design. The author suggests that tRPC is better suited for small startups or internal use cases, while GraphQL is more suitable for larger applications with multiple teams consuming APIs. Ultimately, the choice between tRPC and GraphQL depends on the specific needs and goals of the project, as well as the team's experience and expertise.
Dec 12, 2022 1,737 words in the original blog post.
The text discusses the importance of adopting an API-first mentality and strategy in order to succeed in today's business landscape. It highlights how APIs have become a crucial element in modern services, connecting them together like a "glue" that enables data exchange and retrieval. The author argues that thinking about solutions instead of features is key to success, and that building an API with a great developer experience can make it easy for developers to want to use the service. The text also emphasizes the importance of providing the right added value through the right API, as this will become a critical element of success in the API Economy. Additionally, it discusses challenges such as internal APIs not being mature enough, developers lacking experience with building a world-class API, and traditionalists resisting change. The author concludes by highlighting the benefits of the API Economy, including minimum waste, maximum focus on value creation for customers, and working with services internally becoming easier. Finally, it introduces WunderGraph as a tool that can help organizations unlock these benefits.
Dec 07, 2022 2,487 words in the original blog post.