Update to C++17
Highlights from #52:
Adopting C++17
- Move to PEGTL master/3.0.0 (not yet officially released)
- Use
std::variantforresponse::Value - Replace
std::unique_ptrfor 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
Mutationaccessors to something likeapplyFieldName. Calling everythinggetFieldNamefeels strange when performing a mutation.
Miscellaneous
- Introduce
service::FieldResultwhich handles returning either by value ofTor as astd::future<T> - Let the caller specify the
std::launchpolicy for theRequest::resolvetop-level call. - Build a separate library target for the grammar/AST.
- Replace
std::stringwithstd::string_viewwhere 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::graphqlnamespace with justgraphqlfor the sake of brevity.