Description
Per discussion in wravery/electron-cppgraphql#9, maybe some of this project could be reused in C++ clients/consumers.
Just brainstorming, but to consume another GraphQL service, you'd need to build a fetch and subscribe channel that sends the queries and gets back JSON (or an equivalent in-memory type like graphql::response::Value
), then parse/visit that to build a local object tree. Declaring the object types from a schema+query isn't implemented, but it's theoretically doable. There's another project at https://github.com/caffeinetv/CaffQL which seems to have taken that approach (starting from an Introspection
query rather than the schema definition).
There are some very interesting possibilities if both the client and server are written with the same framework in C++. Test mocks for one, but it could also be useful in scenarios like https://github.com/wravery/gqlmapi-winrt where you need to bridge from one native process to another. Right now https://github.com/wravery/gqlmapi-winrt is not a proper GraphQL client, it just passes strings back and forth as a proof of concept.