Skip to content

Releases: microsoft/cppgraphqlgen

Bug fix in list value parsing

12 Jan 12:57
Compare
Choose a tag to compare

There was a bug in the GraphQL list value parser which expected an intermediate node in the parse tree between the list and the items in the list. Passing list values as variables works around the bug, but if you build a list in the GraphQL query (including inserting a variable value into a list) it would dereference an out of bounds vector element on an empty vector.

1.0.0 Release

07 Jan 21:11
Compare
Choose a tag to compare

All planned features and testing are done, so let's call it complete. 💯

I built it into an Electron app with a Node native module and I got GraphiQL working against that, which uncovered some gaps in the Introspection support. I plan on publishing the native module and the GraphiQL app which consumes it as samples under my own account rather than trying to integrate them as complete projects into this one. Relevant code snippets might make their way into the documentation.

I also added runtime @directive support. You can declare custom directives in the schema and they will be included in the Introspection. If you include directives in your queries at runtime, they will be passed to each of the getField interface accessors in a response::Value 2-level map.

To support passing directives and adding future parameters, I defined a parameter block struct service::FieldParams. The signature of the generated interfaces should not need to change again just to support passing new contextual or environmental parameters into them, which will make it easier to perform non-breaking minor-version updates in the future.

Many new features!

21 Dec 07:23
0d40548
Compare
Choose a tag to compare

This release incorporates several large refactors since v0.6. It's much closer to a v1.0 release than before, but there are still a couple of Issues to work through before jumping to v1.0.

Highlights include:

  • Better CMake configuration for inclusion in other projects
  • Async support using std::future<> and service::RequestState
  • JSON-agnostic GraphQL responses. It's still using RapidJSON for JSON serialization by default, but now it's isolated in a single file which you can replace if you want to link with something else.
  • GraphQL subscription support (subscribe/unsubscribe/deliver)

The downside is that if you have a lot of custom code in your interface implementations or callers, the signatures of most of these methods changed quite a bit, particularly for the async support. I don't anticipate needing to break the interface again between now and v1.0.

User Defined Literals and performance improvements

03 Dec 19:10
81b5c37
Compare
Choose a tag to compare
  • I added a C++ string UDL so you can parse a hard-coded GraphQL query or schema with "..."_graphql, much like the graphql function in Relay which instructs the relay-compiler to preprocess queries embedded in JS/JSX (or TS/TSX for TypeScript).
  • I made some improvements to the tests to cache more between tests in the test class/fixture so there's less work in the per-test Setup/Teardown.
  • The RapidJSON calls are optimized to avoid excessive memory copies between separate documents at runtime in the service. Pretty much all of the rapidjson::Value objects included in the results document should be constructed in place using the target document's own allocator.

CMake cleanup

27 Nov 00:03
47e90d6
Compare
Choose a tag to compare

Making the build compatible with package managers such as vcpkg without requiring additional patches.

Replacing cpprestsdk with RapidJSON

26 Nov 03:31
a9e690b
Compare
Choose a tag to compare

This release doesn't have any runtime dependencies on building other projects. All of the dependencies are header-only libraries now.

Replacing the libgraphqlparser dependency with tao::pegtl

24 Nov 00:52
880e8a7
Compare
Choose a tag to compare
Merge pull request #2 from Microsoft/pegtl

Replace the GraphQL parser with a PEGTL implementation

Updating to production ready

07 Sep 05:56
Compare
Choose a tag to compare

While there's still more to do and it's not ready for v1.0, I think this is ready for use in another project now. So I'm dropping the pre-release flag from this release.

This version updates the documentation and samples, plus some tweaks to the CMake configuration to make it easier to create a vcpkg port from this release.

Initial public release

11 Aug 18:50
Compare
Choose a tag to compare
Pre-release

See the README file for instructions on getting started on Linux or Windows.