Releases: microsoft/cppgraphqlgen
v4.5.6
Only install RapidJSON in vcpkg manifest mode if GRAPHQL_USE_RAPIDJSON is enabled
What's Changed
- Make workflows work with vcpkg binary artifact caching by @wravery in #293
- Make the vcpkg rapidjson dependency conditional on a feature by @wravery in #294
Full Changelog: v4.5.4...v4.5.5
Fix building DLLs with clang on Windows
What's Changed
Full Changelog: v4.5.3...v4.5.4
Make find_package(cppgraphqlgen CONFIG) depend on PEGTL
What's Changed
Full Changelog: v4.5.2...v4.5.3
Some bug fixes/cleanup and a new HTTP client/server sample
What's Changed
- Default arguments break for incomplete struct definitions in input types by @wravery in #282
- Add an HTTP client/server sample with Boost.Beast by @wravery in #283
- Improve awaitable errors by @wravery in #285
- Fixing SonarQube static analysis warnings by @wravery in #286
- Export compile commands and fix some SonarLint warnings by @wravery in #287
Full Changelog: v4.5.1...v4.5.2
Miscellaneous bug fixes
Bug fixes and link-time-optimization support for GCC 12
The most notable change was part of the fix for #254 in #256. In the course of debugging it, I realized that response::IdType
was being overly aggressive about trying to interpret any string that was a valid Base64 encoding as a Base64 encoded vector of bytes:
I'm bumping the minor version because
response::IdType
in inputs/arguments is going to be a string all the time internally, and that changes which accessors you can use on field arguments. It's generally more consistent now, but if you are used to using it with Base64 encoded binaries and your code assumes that's what it contains, you may need to perform the conversion explicitly withargId.release<response::IdType::ByteData>()
rather than using theconst
ByteData
accessors. You can still useresponse::IdType::isBase64()
to tell if it's safe to release it as a binary (otherwise it will throw an exception for strings which are not valid Base64 encodings), and it's always safe to release it as a string. It's also always safe to use theconst
c_str()
OpaqueString
accessor onresponse::IdType
field arguments now because they are guaranteed to hold a string internally.
The
response::IdType::ByteData
type is just an alias forstd::vector<std::uint8_t>
, which was the original type forresponse::IdType
before I addedstd::string
support, so you could also write therelease
call asargId.release<std::vector<std::uint8_t>>()
if that looks better to you. The same applies toresponse::IdType::OpaqueString
vs.std::string
.
Otherwise, most of the changes since v4.4.1 have to do with fixing warnings and errors that showed up when enabling LTO (link-time-optimization) in GCC 10 and 12. The project, including all samples and tests, should now build cleanly with GCC using the -flto=auto
compiler flag.
What's Changed
- Update PEGTL version number in README by @wravery in #253
- Fix source lifetime and preserve input strings in response::IdType by @wravery in #256
- Miscellaneous warnings and errors which showed up in GCC 12 by @wravery in #257
- Adding Microsoft SECURITY.MD by @microsoft-github-policy-service in #259
- Cleanup redundant inline specifiers by @wravery in #262
New Contributors
- @microsoft-github-policy-service made their first contribution in #259
Full Changelog: v4.4.1...v4.5.0
Custom PEGTL parse tree without unwind support
Till the try/catch/rethrow handling is fixed in the PEGTL
version of parse_tree
, throwing an exception during parsing easily overflows the stack on Windows with MSVC. This change brings a simplified version of the PEGTL
parse_tree
into cppgraphqlgen
without support for the unwind
feature (which cppgraphqlgen
doesn't use), so it no longer needs to handle the exceptions at each level of the tree. It just lets them be caught directly in the caller after destroying all of the objects on the stack.
The short version is that this should fix #222 using the default depth limit of 25 (or even up to ~100) rather than needing to set it to something less than 10. If/when PEGTL
is updated to remove the try/catch/rethrow implementation, cppgraphqlgen
can revert to using the original version of parse_tree
in PEGTL
.
This version also updates the PEGTL
sub-module and find_package
call in CMake
to use 3.2.6, which has some fixes for recent versions of both MSVC and GCC. If you have a CI build which uses cppgraphqlgen
and PEGTL
(e.g. from vcpkg
), you may have noticed that it broke recently when Visual Studio was updated. This should fix that, too.
What's Changed
Full Changelog: v4.4.0...v4.4.1
Simplify generated code for input types in schemagen and clientgen
This is a minor version update because the code does need to be regenerated with schemagen
/clientgen
to maintain compatibility with the GraphQLService.h
/GraphQLClient.h
shared headers.
There's also a fix for a command line parsing bug in clientgen
(#248) and several small documentation fixes to match changes in behavior or improve clarity.
What's Changed
- Fix #248 by @wravery in #250
- Use concepts and type traits instead of specializing service::isInputType() for each input type by @wravery in #249
- Clarify clientgen usage in latest version by @wravery in #251
Full Changelog: v4.3.1...v4.4.0
Mitigate breaking changes since v4.2.0
What's Changed
- Add
response::IdType
accessors for backwards compatibility by @wravery in #245 - Generate input type copy constructors by @wravery in #247
Full Changelog: v4.3.0...v4.3.1