onflow / flow

Flow is a fast, secure, and developer-friendly blockchain built to support the next generation of games, apps, and the digital assets that power them 🌊
https://onflow.org
Apache License 2.0
360 stars 164 forks source link

Update Access API docs with more context around interaction & remove outdated information #1151

Open sisyphusSmiling opened 2 years ago

sisyphusSmiling commented 2 years ago

Introduction

After teaching myself to interact with the Access API, I found the docs a bit lacking with regards to onboarding. My discovery process was basically the following:

  1. Tried onboarding to Alchemy only to remember they're no longer partnered with Flow - mention of Alchemy should be removed to avoid confusion
  2. Figure out how to interact with a gRPC API - settled on gRPCurl as my cli client
  3. Figure out how to get the API definition so I could interact with the API using my client - I ended up importing access.proto from flow/protobuf/flow/access/access.proto

This then allowed me to interact with the API, but clearer docs would've saved me time and confusion. After seeing we have an OpenAccess REST API, I download Swagger Viewer VS Code extension. Once I did, I was able to preview and interact with the API in a simple UI, making requests significantly easier (see screenshot below).

Screen Shot 2022-10-21 at 11 38 20 AM

Suggestion

Based on my onboarding experience, I'd recommend a couple things:

One last request that, if possible, would probably be its own issue - adding reflection to the gRPS API. This would allow them to simply list the API methods so that devs don't have to load the .proto themselves.

P.S. Bonus issue - the link in protobuf/README.md is broken

daorren commented 5 months ago

good advice! why is it still ignored in 2024 simply adding reflection to grpc service, can make grpcurl users feel much better