A C++ library and code generator for building and consuming GraphQL services, enabling native GraphQL in hybrid apps.
cppgraphqlgen is a C++ GraphQL schema service generator that provides libraries and utilities for building and consuming GraphQL services in C++. It solves the problem of integrating GraphQL into native or hybrid applications, allowing developers to run GraphQL services locally for offline data access and client-side data generation without relying on remote servers.
C++ developers building native or hybrid applications with React frontends (using Relay or Apollo) who need to integrate GraphQL services directly into their client-side or server-side C++ codebases.
Developers choose cppgraphqlgen because it provides a complete, type-safe C++ solution for GraphQL service implementation and consumption, enabling seamless integration with modern GraphQL clients and supporting offline data scenarios without requiring separate data interfaces.
C++ GraphQL schema service generator
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Enables GraphQL services in native or hybrid apps for offline data caching and client-side data sources, as described for React Native integration without server round trips.
Generates C++ types from GraphQL schemas using schemagen and clientgen utilities, ensuring compile-time safety and reducing runtime errors.
Requires C++20 with coroutines and concepts, leveraging modern language features for efficient asynchronous operations and type checking.
Tested on Windows, macOS, and Linux with specific compiler versions, making it suitable for diverse development environments.
Supports optional JSON handling with RapidJSON and unit testing with Google Test, allowing projects to customize based on needs.
Requires CMake, vcpkg, and multiple dependencies like PEGTL and Boost, which can be cumbersome to set up, especially without vcpkg.
The README highlights niche sample projects like GqlMAPI, indicating a smaller community and fewer general-purpose examples for common use cases.
Migration guides between versions (e.g., v3.x to v4.x) suggest breaking changes that could require significant code updates for existing users.
Relies on code generation for each schema change, adding to build time and requiring manual implementation of generated interfaces, which may not scale well for rapid iterations.