Update to C++17
Highlights from #52:
Adopting C++17
- Move to PEGTL master/3.0.0 (not yet officially released)
- Use
std::variant
forresponse::Value
- Replace
std::unique_ptr
for nullable fields withstd::optional
Schemagen improvements
- Make NYI stub generation optional
- Split the class definitions/declarations into separate files. May also help with making the NYI stubs optional (i.e. decide whether or not to compile and link them individually).
- Improve error handling/reporting.
- Add command line options for things like defining a target directory.
- Change the names of the generated
Mutation
accessors to something likeapplyFieldName
. Calling everythinggetFieldName
feels strange when performing a mutation.
Miscellaneous
- Introduce
service::FieldResult
which handles returning either by value ofT
or as astd::future<T>
- Let the caller specify the
std::launch
policy for theRequest::resolve
top-level call. - Build a separate library target for the grammar/AST.
- Replace
std::string
withstd::string_view
where appropriate. - Replace
ast<std::string>
withast<std::vector<char>>
to deal with small-string-optimization issues rather than reserving extra space when the string is too short. - Replace the
facebook::graphql
namespace with justgraphql
for the sake of brevity.