Skip to content

Seperating APIs for node ops from Libplanet.Explorer #2132

Description

@longfin

When posting #2130, I've wanted to move GraphQL mutations from NineChronicles.Headless to Libplanet.Explorer. but then I felt awkwardness...

  • Libplanet.Explorer had 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.Explorer and NineChronicles.Headless to new project. (call it Libplnet.NodeAPI)
  • Like as Libplanet.Explorer, Libplanet.NodeAPI is a library project and can be injected by .NET DI. (like MagicOnion)
  • Instead of GraphQL, Libplanet.NodeAPI relies OpenAPI1 to provide direct API instead of query.
    • GraphQL is still possible option for Libplanet.NodeAPI considering 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

  1. Or, any other spec is welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiRelated to user-facing APIsdiscussion neededWe need to dicuss about thissuggestionSuggestion or feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions