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

Create a forc-indexer plugin #294

Closed
ra0x3 opened this issue Oct 28, 2022 · 2 comments · Fixed by #372
Closed

Create a forc-indexer plugin #294

ra0x3 opened this issue Oct 28, 2022 · 2 comments · Fixed by #372
Assignees
Milestone

Comments

@ra0x3
Copy link
Contributor

ra0x3 commented Oct 28, 2022

  • Not much context here but we want a forc-indexer plugin that will auto-generate things like configs/assets/whatever
  • Let's sync before anyone picks this up, as there is a bit more info to be flushed out
@ra0x3 ra0x3 mentioned this issue Oct 28, 2022
15 tasks
@ra0x3 ra0x3 self-assigned this Oct 31, 2022
@ra0x3
Copy link
Contributor Author

ra0x3 commented Nov 2, 2022

@adlerjohn @SilentCicero

  • Want to get some feedback on this before the work starts.
  • Feel free to checkout my comments below.

Forc Indexer Plugin

  • Basically just a CLI util used to run simple commands against a remote/local index node

The below commands are inspired by the plugins section of the Sway book

Name: forc-index
Invocation: forc index [args] [opts]

Examples

  • For now, the main idea is that these commands are just one-liners for basic/standard HTTP requests against some index node, as well as simple forc-like commands

forc index authenticate

  • Unused, but would show how downstream users would authenticate against their index operator

forc index list indices -n com.fuel

  • The above command would make a GET to /api/:namespace with the namespace -n being com.fuel
  • Would return a JSON payload of available indices

List of supported commands

  • forc index authenticate
    • Authenticate
  • forc index list indices
    • List indices
  • forc index deploy -n com.fuel -i my_index --manifest manifest.yaml --schema schema.graphql --module my_index.wasm
  • forc index stats --url https://index.stripe.com
    • If not doing authentication could also supply a --url to specify which hostname the command should be run against
  • forc index new|init|deploy
    • init (new index in existing project), new (new project), deploy upload index
    • Similar to forc
  • Can obviously add as many of these commands as we want 👌

@ra0x3
Copy link
Contributor Author

ra0x3 commented Nov 22, 2022

@ra0x3 ra0x3 linked a pull request Nov 29, 2022 that will close this issue
3 tasks
@ra0x3 ra0x3 added this to the Beta-3 milestone Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant