cppgraphqlgen

C++ GraphQL schema service generator

MIT License

Stars
323
Committers
16

Bot releases are hidden (Show)

cppgraphqlgen - Grammar fixes for unhandled GraphQL standard syntax

Published by wravery about 1 month ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.5.7...v4.5.8

cppgraphqlgen - Couple of bug fixes Latest Release

Published by wravery 3 months ago

cppgraphqlgen - v4.5.6

Published by wravery 6 months ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.5.5...v4.5.6

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.5.4...v4.5.5

cppgraphqlgen - Fix building DLLs with clang on Windows

Published by wravery over 1 year ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.5.3...v4.5.4

cppgraphqlgen - Make find_package(cppgraphqlgen CONFIG) depend on PEGTL

Published by wravery over 1 year ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.5.2...v4.5.3

cppgraphqlgen - Some bug fixes/cleanup and a new HTTP client/server sample

Published by wravery over 1 year ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.5.1...v4.5.2

cppgraphqlgen - Miscellaneous bug fixes

Published by wravery over 1 year ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.5.0...v4.5.1

cppgraphqlgen - Bug fixes and link-time-optimization support for GCC 12

Published by wravery over 2 years ago

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 with argId.release<response::IdType::ByteData>() rather than using the const ByteData accessors. You can still use response::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 the const c_str() OpaqueString accessor on response::IdType field arguments now because they are guaranteed to hold a string internally.

The response::IdType::ByteData type is just an alias for std::vector<std::uint8_t>, which was the original type for response::IdType before I added std::string support, so you could also write the release call as argId.release<std::vector<std::uint8_t>>() if that looks better to you. The same applies to response::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

New Contributors

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.4.1...v4.5.0

cppgraphqlgen - Custom PEGTL parse tree without unwind support

Published by wravery over 2 years ago

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: https://github.com/microsoft/cppgraphqlgen/compare/v4.4.0...v4.4.1

cppgraphqlgen - Simplify generated code for input types in schemagen and clientgen

Published by wravery over 2 years ago

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

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.3.1...v4.4.0

cppgraphqlgen - Mitigate breaking changes since v4.2.0

Published by wravery over 2 years ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.3.0...v4.3.1

cppgraphqlgen - Implement several feature requests and cleanup code

Published by wravery over 2 years ago

Possible Breaking Changes

Most users should not notice the difference, but there are a few things that might require changes to your code or build settings:

  • Almost every struct and method/function that returns anything is now decorated with [[nodiscard]], so you may get compiler warnings where you did not before. If you treat warnings as errors, this could also break your build.
  • The [[nodiscard]] annotations led me to notice that I was not checking the result of the ResolverContext::NotifySubscribe/ResolverContext::NotifyUnsubscribe resolvers in subscribe/unsubscribe. I decided in https://github.com/microsoft/cppgraphqlgen/commit/63ef2ce08c5804aa42dbfefcb22cfd137d696cd6 that subscribe/unsubscribe ought to propagate the errors by throwing an exception. If you have a default subscription object and it does not handle every field gracefully in the ResolverContext::NotifySubscribe/ResolverContext::NotifyUnsubscribe case (for instance you are using the NYI generated stubs which throw exceptions), you may need to work around that. The changes in https://github.com/microsoft/cppgraphqlgen/pull/240 allow a couple of ways to do that:
    • If you do not handle the ResolverContext::NotifySubscribe/ResolverContext::NotifyUnsubscribe resolver calls, you can leave the default subscription object on Operations empty and it will skip that call. You need to override the default (empty) subscription object in each call to deliver if you were not already doing that, since the default subscription object is also used by deliver in the absence of an override.
    • You can override the subscription object used for ResolverContext::NotifySubscribe/ResolverContext::NotifyUnsubscribe now in subscribe/unsubscribe, as an additional member in RequestSubscribeParams/RequestUnsubscribeParams.
  • PR https://github.com/microsoft/cppgraphqlgen/pull/241 added support for generating multiple operation objects in a single request document from clientgen. Part of that involved moving the enum and input type declarations to a shared namespace (already specified with the --namespace parameter). They are re-exposed with using statements in the per-operation namespace, but since the input types used to be declared inline as part of the Variables struct, you may need to remove the Variables:: scope from code which references them. You can now reference them from either the --namespace shared namespace or the per-operation namespace which still contains the Variables struct.

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.2.0...v4.3.0

cppgraphqlgen - Fixing various issues reported in v4.1.1

Published by wravery over 2 years ago

I had to make a few changes that may be incompatible with existing consumers, but they are small enough that I think this can be considered a minor version update rather than a full major version. The changes which are most likely to affect existing code are the updates to response::IdType (see changes to how the fake ID's are initialized in TodayMock.cpp), and how nullable nested input types are represented as std::unique_ptr instead of std::optional to support cycles of nullable/list input types (see changes in ClientTests.cpp where it initializes the Variables::CompleteTaskInput variable).

What's Changed

New Contributors

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.1.1...v4.2.0

cppgraphqlgen - Bug fixes and custom awaitable improvements

Published by wravery over 2 years ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.1.0...v4.1.1

cppgraphqlgen - Fix clientgen scalar variables and make Request thread-safe

Published by wravery over 2 years ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v3.7.0...v3.7.1

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.0.1...v4.1.0

cppgraphqlgen - schemagen bug fixes and cleanup

Published by wravery almost 3 years ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v4.0.0...v4.0.1

cppgraphqlgen - C++20, type erasure, and breaking changes which simplified the API

Published by wravery almost 3 years ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v3.6.0...v4.0.0

cppgraphqlgen - Final v3.x release with compatible improvements from v4.0.0

Published by wravery almost 3 years ago

What's Changed

Full Changelog: https://github.com/microsoft/cppgraphqlgen/compare/v3.6.0...v3.7.0

Package Rankings
Top 8.17% on Proxy.golang.org
Related Projects