libplanet
libplanet copied to clipboard
Seperating APIs for node ops from `Libplanet.Explorer`
When posting #2130, I've wanted to move GraphQL mutations from NineChronicles.Headless to Libplanet.Explorer. but then I felt awkwardness...
Libplanet.Explorerhad been intended as a set of query, not mutation.- GraphQL is commonly used to describe APIs for data platforms. I don't think it's suitable for adding tx to the stage, or for signing unsigned transactions.
Therefore, I suggest as like below
- Separting (or duplicating) some node-related APIs from
Libplanet.ExplorerandNineChronicles.Headlessto new project. (call itLibplnet.NodeAPI) - Like as
Libplanet.Explorer,Libplanet.NodeAPIis a library project and can be injected by .NET DI. (likeMagicOnion) - Instead of GraphQL,
Libplanet.NodeAPIrelies OpenAPI[^1] to provide direct API instead of query.- GraphQL is still possible option for
Libplanet.NodeAPIconsidering environment like graphql-playground, but Swagger seems comparable.
- GraphQL is still possible option for
Maybe there are some misunderstandings because I'm still not familiar with GraphQL. Feel free to leave a comment. 🙏
[^1]: Or, any other spec is welcome.