Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL interface #6

Open
linuskendall opened this issue Nov 5, 2023 · 2 comments
Open

GraphQL interface #6

linuskendall opened this issue Nov 5, 2023 · 2 comments
Labels
downstream what rpc will provide to users/clients/consumers of the API

Comments

@linuskendall
Copy link

linuskendall commented Nov 5, 2023

GraphQL has been discussed as a potential option for a queryable interface to RPC. Especially with a more extensible support for parsed data ( see #5).

There are some examples already:

  • Solana FM has graphql support for querying on chain data
  • Other blockchains have implemented GraphQL as standardised ways to query
  • People in Solana ecosystem have said this would enhance developer eperience

On the negative side is that this is a fairly complex addition compared to the simplistic nature of the jsonrpc interface and that it may enforce an indexed datastore (see #7).

@grooviegermanikus
Copy link
Contributor

do you know if we need to have queries spanning over accounts and transactions or will we have separated areas?

@buffalojoec
Copy link

buffalojoec commented Nov 14, 2023

I think if we lean more heavily on the modular interface side of things, we can possibly have a separate interface for GraphQL, and an RPC sidecar that supports GraphQL can explicitly say so.

Developers could also roll "resolvers" which use some other sidecar/server implementation but allow use of GraphQL queries on their client-side. This would effectively be a "middle-man" approach, and can be done using this:

https://github.com/solana-labs/solana-web3.js/tree/master/packages/rpc-graphql

Regardless, I think the interface for GraphQL should be unrelated to the "vanilla" interface for JSON RPC.

@grooviegermanikus grooviegermanikus added the downstream what rpc will provide to users/clients/consumers of the API label Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
downstream what rpc will provide to users/clients/consumers of the API
Projects
None yet
Development

No branches or pull requests

3 participants