Home / Companies / Wundergraph / Blog / July 2023

July 2023 Summaries

6 posts from Wundergraph

Filter
Month: Year:
Post Summaries Back to Blog
We're hiring! We're looking for Golang (Go) Developers, DevOps Engineers and Solution Architects to help shape the future of Microservices, distributed systems, and APIs. Everything is a key-value store if you try hard enough. We've built Open Previews, an open-source commenting functionality that allows users to collect feedback on previews/staging environments or any other website. The solution uses divs in GitHub discussions as a key-value store by embedding JSON inside data attributes of empty DIVs and encoding the JSON using encodeURIComponent. GitHub Discussions is a great key-value store due to its powerful features such as statelessness, scalability, authentication, authorization, notifications, versioning, and spam protection. We've implemented stateless authentication using JSON Web Encryption to securely store access tokens in the browser. We're still working on Open Previews and have ideas for new features, including support for PR reviews and GitHub Checks, optimistic updates, like & reply to comments, Markdown/Emoji support, and image uploads.
Jul 25, 2023 922 words in the original blog post.
OpenAI's new Functions feature allows developers to define operations using JSON Schema, enabling them to return structured data (JSON) from the platform. The WunderGraph Agent SDK automates the process of building APIs on top of OpenAI by generating OpenAPI documentation and code for integrating with other machines. By leveraging this technology, developers can create AI-enhanced APIs that conform to a defined schema, making it easier to expose these APIs to other systems.
Jul 19, 2023 816 words in the original blog post.
WunderGraph has integrated OpenAI Functions into its platform, allowing developers to add custom functions to the context. However, this feature can be vulnerable to prompt injections, where malicious users can manipulate the input to trigger unintended function calls. To mitigate this risk, WunderGraph has introduced Honeypot functions, which detect and prevent prompt injections by trapping unwanted function calls in a way that allows valid user inputs to pass through. The integration with OpenAI Functions is designed to provide a secure and powerful way for developers to build custom functionality into their applications and APIs.
Jul 18, 2023 969 words in the original blog post.
The WunderGraph OpenAI integration / Agent SDK allows developers to seamlessly build AI-enhanced APIs and AI agents for systems integration on autopilot. The solution addresses several challenges, including returning structured data from OpenAI, preventing prompt injection attacks, processing large amounts of data, composing multiple agents, and integrating OpenAI with existing APIs like REST, GraphQL, SOAP, or databases. By using the WunderGraph Agent SDK, developers can create AI agents that can be used to integrate any API into their application, making it easier to build complex AI-powered systems.
Jul 14, 2023 2,362 words in the original blog post.
WunderGraph is an open-source BFF (Backend-for-Frontends) framework that enables developers to build scalable and maintainable APIs. The framework provides a type-safe testing library, making it easier to write tests for the data sources used in the BFF system. This library allows developers to create test servers with full typesafe access to their data, making it possible to isolate and verify the correctness of the actual code being tested. WunderGraph also supports mocking, which enables developers to control the behavior of dependencies and external functions during testing, without affecting the actual datasources. The framework is fully compatible with PlayWright for E2E testing. By using WunderGraph's built-in testing library, developers can write better tests more easily, mock responses, and test their app and BFF implementation without calling the actual data sources during development.
Jul 06, 2023 1,751 words in the original blog post.
We've optimized large GraphQL operations in Go by using the pprof tool to identify performance bottlenecks. Our customer was running a mutation against their GraphQL server directly, which took around 1 minute, but routing it through our gateway (built on top of graphql-go-tools) reduced its execution time to around 20 seconds, a 98.71% reduction. We narrowed down the problem by reproducing it and identifying a pathological case where data was being manipulated in an inefficient way. Our approach balances maintainability with writing fast code, using Go's excellent testing, debugging, and profiling tools. By optimizing JSON encoding and input value injection, we reduced execution times from 4.3 seconds to 10ms and 61% respectively. We also found that the operation is now faster when using the gateway than when using the GraphQL server directly due to our optimized parser and normalization engine.
Jul 04, 2023 1,894 words in the original blog post.