Best of WunderGraph2025

  1. 1
    Article
    Avatar of wundergraphWunderGraph·51w

    We accidentally built a backend framework for LLMs

    WunderGraph accidentally created a backend framework for LLMs while solving API orchestration challenges. Their Cosmo Plugins system uses LLMs to generate proxy code that connects non-GraphQL services to a unified Supergraph, enabling companies to build modular monoliths or microservices without rewriting existing REST APIs. The framework leverages GraphQL Federation to create a single API entry point from multiple services, reducing complexity and API calls while maintaining deployment flexibility.

  2. 2
    Article
    Avatar of wundergraphWunderGraph·1y

    Golang sync.Pool is not a silver bullet

    Golang's sync.Pool is a thread-safe object pooling mechanism that helps reduce memory allocations and garbage collection pressure. However, it comes with potential pitfalls like unpredictable memory growth, size distribution issues, and added complexity. It is valuable in scenarios with predictable object sizes, high-frequency allocations, and short-lived objects, but should be avoided in cases with varying object sizes, low allocation frequency, and long-lived objects. Alternative approaches like direct allocation, fixed-size buffers, and multiple pools may be more appropriate for some situations.

  3. 3
    Article
    Avatar of wundergraphWunderGraph·1y

    Golang sync.WaitGroup: Powerful, but tricky

    The post explores the complexities and nuances of using Golang's sync.WaitGroup for concurrent programming. It highlights common pitfalls like deadlocks and goroutine leaks, emphasizing the importance of correct lifecycle management and using context.Context for cancellation. Additionally, it introduces errgroup.Group as an alternative for coordinated error handling and cancellation in goroutines, offering practical guidance on when to use each. The author also discusses proposals to make WaitGroup more ergonomic and touches on the significance of careful design and testing in concurrency.

  4. 4
    Article
    Avatar of wundergraphWunderGraph·24w

    TypeScript Plugin Support for Cosmo Connect

    Cosmo Connect now supports TypeScript router plugins, enabling developers to extend GraphQL federation routers with custom logic written in TypeScript without deploying separate services. Previously limited to Go, this feature makes plugin development accessible to TypeScript-focused teams. Plugins run inside the router, are published through Cosmo Cloud, and participate in schema checks like subgraphs. The workflow involves initializing a plugin via CLI, generating protobuf definitions from GraphQL schemas, implementing RPC handlers in TypeScript, building the plugin artifact, and publishing to Cosmo Cloud where routers automatically pull updates. This approach is particularly useful for wrapping legacy REST APIs or exposing small pieces of logic without the operational overhead of deploying full subgraph services.

  5. 5
    Article
    Avatar of wundergraphWunderGraph·52w

    API Orchestration with LLMs: Integrate APIs with a single prompt

    The post discusses the challenges of declarative API orchestration using tools like Apollo Connectors and introduces WunderGraph's new approach with gRPC Plugins. Leveraging LLMs, this solution simplifies API integration by automating code generation and addressing issues like the N+1 problem, testability, and debugging. By choosing Hashicorp's go-plugin library and focusing on a scalable, low-overhead development experience, it promotes ease of use, allowing plugins in multiple programming languages.

  6. 6
    Article
    Avatar of wundergraphWunderGraph·1y

    Is gRPC Really Better for Microservices Than GraphQL?

    gRPC and GraphQL are two leading solutions for microservices communication, each offering unique advantages. gRPC emphasizes performance and efficiency with binary serialization and HTTP/2, making it ideal for backend-to-backend communication and real-time applications. GraphQL offers flexibility with dynamic queries and Federation, simplifying client-side data fetching and scaling across decentralized teams. Both technologies can complement each other in a hybrid approach to optimize backend performance and client-facing APIs.