Replies: 1 comment 1 reply
|
For me, the idea of staging a transaction via GraphQL doesn't feel very weird. While I agree with the point that signing or generating a transaction via queries is awkward as they are pure computations rather than queries for the data from the remote source, providing a single API endpoint for getting and editing (from a Web2 standpoint) would be ideal from GraphQL users' perspective. For example, EIP-1767 also includes the mutation. I think the real problem lies in the signature: we haven't found a way to sign a transaction (or, so to speak, mutation) while keeping GraphQL's semantics. EIP-1767 circumvents this problem by having a single mutation that accepts the raw transaction, but you won't know what the mutation does unless you look into the raw bytes. This breaks GraphQL's semantics. We could have a middle-man sign a transaction on the user's behalf and provide a semantic API to be translated into a signed raw transaction that Libplanet can understand. Then we can have OpenAPI or any RPC protocol to communicate with Libplanet-enabled nodes, and users can run the application with a middle-man to talk with the node. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When posting #2130, I've wanted to move GraphQL mutations from
NineChronicles.HeadlesstoLibplanet.Explorer. but then I felt awkwardness...Libplanet.Explorerhad been intended as a set of query, not mutation.Therefore, I suggest as like below
Libplanet.ExplorerandNineChronicles.Headlessto new project. (call itLibplnet.NodeAPI)Libplanet.Explorer,Libplanet.NodeAPIis a library project and can be injected by .NET DI. (likeMagicOnion)Libplanet.NodeAPIrelies OpenAPI1 to provide direct API instead of query.Libplanet.NodeAPIconsidering environment like graphql-playground, but Swagger seems comparable.Maybe there are some misunderstandings because I'm still not familiar with GraphQL. Feel free to leave a comment. 🙏
Footnotes
Or, any other spec is welcome. ↩
All reactions