Skip to content

Releases: microsoft/cppgraphqlgen

Mitigate breaking changes since v4.2.0

08 May 05:54
681c08d
Compare
Choose a tag to compare

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

Implement several feature requests and cleanup code

05 May 22:09
c0d6bf1
Compare
Choose a tag to compare

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 63ef2ce 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 #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 #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

  • Add a migration guide from v3.x to v4.x by @wravery in #236
  • Add constexpr support to internal::sorted_map and internal::sorted_set by @wravery in #237
  • Make the default subscription object optional and allow an override for subscribe/unsubscribe by @wravery in #240
  • Output all operations from clientgen if the --operation flag is not specified by @wravery in #241
  • Code cleanup by @wravery in #242
  • Update docs for next release by @wravery in #243

Full Changelog: v4.2.0...v4.3.0

Fixing various issues reported in v4.1.1

25 Apr 23:07
b41c977
Compare
Choose a tag to compare

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

  • Fixes for #208 and #209 by @wravery in #214
  • Make CMake old-file cleanup safer/more specific by @wravery in #215
  • Update PEGTL submodule to 3.2.5 by @wravery in #219
  • Add a unit test for invalid string escape sequences by @wravery in #223
  • Adds a virtual default destructor for RequestState by @ALTinners in #228
  • Add a configurable depth limit to the parser by @wravery in #231
  • Accept either a Base64 encoded binary or an opaque string in response::IdType by @wravery in #232
  • Options to remove base64 ID encoding at compile time by @ALTinners in #229
  • More constexpr schema by @wravery in #234
  • More constexpr schema by @ALTinners in #227
  • Input type references by @wravery in #235

New Contributors

  • @ALTinners made their first contribution in #228

Full Changelog: v4.1.1...v4.2.0

Bug fixes and custom awaitable improvements

22 Jan 06:49
eef8bcc
Compare
Choose a tag to compare

What's Changed

  • Don't add Variables:: scope to scalar and built-in types in clientgen by @wravery in #202
  • Make Request/Operations methods thread-safe and test custom awaitables by @wravery in #204
  • Bump patch version for bugfix release by @wravery in #207

Full Changelog: v4.1.0...v4.1.1

Fix clientgen scalar variables and make Request thread-safe

22 Jan 06:46
e597db3
Compare
Choose a tag to compare

What's Changed

  • Don't add Variables:: scope to scalar and built-in types in clientgen by @wravery in #203
  • Make Request/Operations methods thread-safe by @wravery in #205
  • Bump patch version for bugfix release by @wravery in #206

Full Changelog: v3.7.0...v3.7.1

Merge graphqlintrospection lib back into graphqlservice, enable/fix more warnings, and make tests more reliable

07 Jan 21:45
cee3dd4
Compare
Choose a tag to compare

What's Changed

  • Enable strict compiler warnings and fix resulting warnings/errors by @wravery in #194
  • Reset the mock service state for each test by @wravery in #195
  • Merge graphintrospection lib back into graphqlservice by @wravery in #197
  • Consolidate TodayMock services and protect async loaders with mutex by @wravery in #198

Full Changelog: v4.0.1...v4.1.0

schemagen bug fixes and cleanup

05 Jan 22:18
6a06c5a
Compare
Choose a tag to compare

What's Changed

Full Changelog: v4.0.0...v4.0.1

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

17 Dec 06:52
9914c36
Compare
Choose a tag to compare

What's Changed

  • Add default fallthrough cases by @wravery in #166
  • Add a learn_star_wars sample based on https://graphql.org/learn/ by @wravery in #168
  • Merge work in progress from personal fork to start working on 4.0 by @wravery in #173
  • More progress on 4.0 tasks by @wravery in #174
  • More progress on 4.0 tasks by @wravery in #175
  • Include fewer/smaller headers to speed up build by @wravery in #176
  • Remove the schemagen --merge-files option and make everything use separate files by @wravery in #177
  • Update to October 2021 release of the GraphQL spec by @wravery in #179
  • Implement delivery by SubscriptionKey and a type-erased JSON writer interface by @wravery in #180
  • Allow field getters to return a std::shared_ptr by @wravery in #181
  • Distinguish AwaitableScalar from AwaitableObject by @wravery in #183
  • Only install new CMake files for install configs by @wravery in #184
  • Minor fixes from testing with the vcpkg port and gqlmapi by @wravery in #185
  • Documentation pass and a little bit of code cleanup by @wravery in #186
  • Fix some code analysis issues detected by VS 2022 by @wravery in #187
  • Bring v4.0.0 to the main branch by @wravery in #188
  • Re-use the same Library.rc.in and Generator.rc.in files across targets by @wravery in #189

Full Changelog: v3.6.0...v4.0.0

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

17 Dec 06:47
9313634
Compare
Choose a tag to compare

What's Changed

Full Changelog: v3.6.0...v3.7.0

Version 4.0 Release Candidate

15 Dec 18:39
9ffd6f0
Compare
Choose a tag to compare
Pre-release

This contains all of the planned code changes for 4.0 discussed in #172. I tested with local changes to the https://github.com/microsoft/vcpkg port file and https:://github.com/microsoft/gqlmapi. I still need to update the documentation before I merge into main and make an official release. Until then, comparing the next branch of gqlmapi to main can give you a preview of some of the changes.

What's Changed

  • Add default fallthrough cases by @wravery in #166
  • Add a learn_star_wars sample based on https://graphql.org/learn/ by @wravery in #168
  • Merge work in progress from personal fork to start working on 4.0 by @wravery in #173
  • More progress on 4.0 tasks by @wravery in #174
  • More progress on 4.0 tasks by @wravery in #175
  • Include fewer/smaller headers to speed up build by @wravery in #176
  • Remove the schemagen --merge-files option and make everything use separate files by @wravery in #177
  • Update to October 2021 release of the GraphQL spec by @wravery in #179
  • Implement delivery by SubscriptionKey and a type-erased JSON writer interface by @wravery in #180
  • Allow field getters to return a std::shared_ptr by @wravery in #181
  • Distinguish AwaitableScalar from AwaitableObject by @wravery in #183
  • Only install new CMake files for install configs by @wravery in #184
  • Minor fixes from testing with the vcpkg port and gqlmapi by @wravery in #185

Full Changelog: v3.6.0...v4.0.0-rc