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

Add information about Glif Nodes subgraphs #2336

Conversation

ArseniiPetrovich
Copy link
Contributor

No description provided.

@ArseniiPetrovich ArseniiPetrovich marked this pull request as ready for review October 31, 2024 10:52
@ArseniiPetrovich
Copy link
Contributor Author

@trruckerfling please verify

Copy link
Member

@BigLep BigLep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are more just drive-by comments as someone interested to learn more and as the creator #2326 . This isn't an area of expertise for me so will leave it to others to give the approval. I do think this meets the done criteria of #2326

smart-contracts/advanced/fevm-indexers.md Outdated Show resolved Hide resolved
smart-contracts/advanced/fevm-indexers.md Outdated Show resolved Hide resolved
smart-contracts/advanced/fevm-indexers.md Outdated Show resolved Hide resolved
smart-contracts/advanced/fevm-indexers.md Outdated Show resolved Hide resolved

Just as with database data queried through SQL, subgraphs have to be stored somewhere. You may run a self-hosted instance as described in [The Graph Academy examples](https://thegraph.academy/developers/local-development/) and deploy a subgraph there. However, as with RPC nodes and databases, running subgraphs locally in production is not recommended from an uptime standpoint. For hosting the subgraph, it is reasonable to use online web services such as AWS or refer to professional subgraph providers such as [Protofire (aka Glif Nodes)](https://api.node.glif.io).

#### Example: Deploying a Subgraph with Glif Nodes (Protofire)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let others decide as I don't know the convention here, but this largely feels like docs that Glif should own and should be on their site. I would imagine filecoin docs just surfaces that this is available but then links off to their docs with the tutorial/example steps.

Basically, I assume we aren't going to do this for each subgraph provider. We'd instead just have a list of the providers and where you can go to learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I understand your concern, it looks pretty valid.
We are currently working on our version of the docs and it might make sense to migrate off eventually, although since there are not that many other teams competing over providing this service maybe it might make sense to keep it here for now, which would allow for two things:

  1. Onboard more developers who might want to jump into Filecoin subgraphs before devcon
  2. Grant some time for us to develop our own docs and eventually migrate it there, because right now there is no place on our end to store this, and despite the fact we have a solid UI, the UX kinda... in development.
    But in like month or so - I'm totally up to migrating this. Or if there are new public subgraph providers emerge and want to have a bit more equal competition, like we have for RPCs.

Anyways, will let the repo maintainers decide.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Inlining this for now seems great to me until there is a better home or other competing providers. Good stuff - way to be pragmatic!

smart-contracts/advanced/fevm-indexers.md Outdated Show resolved Hide resolved
@ArseniiPetrovich
Copy link
Contributor Author

@BigLep Thanks, I appreciate all your comments and suggestion, Steve, they are super valuable!


There are many ways to query existing subgraphs, including numerous well-known libraries for [JavaScript](https://thegraph.com/docs/en/querying/querying-from-an-application/) and [Python](https://thegraph.com/docs/en/querying/querying-with-python/). But even without any third-party tooling, querying a subgraph is no more complicated than querying [RPC nodes](https://docs.filecoin.io/reference/json-rpc). The only complexity is that you have to know the schema of the subgraph beforehand, similar to knowing SQL database tables and columns before being able to query them. Luckily, The Graph provides several ways to discover the subgraph schema. The most convenient one is called the ["Playground"](https://graphql.org/blog/2020-04-03-graphiql-graphql-playground/), and it is available upon a GET request to the subgraph query URL. Alternatively, you may use the discovery method that exists on every subgraph, called the [Introspection Query](https://graphql.org/learn/introspection/).

### Developing Subgraphs on Filecoin FEVM
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @trruckerfling need some help with merging.

Non-blocking nit: The documentation itself is limited in scope, so I would actually consider simplifying these sections even further (by removing the sentence Although it is not...)

@longfeiWan9
Copy link
Member

@ArseniiPetrovich we need to change a few files to show the Subgragh on the side navigation bar. Can you please refer to this #2295 to see how to add the link?

made some minor changes on words and formating.
@longfeiWan9
Copy link
Member

@ArseniiPetrovich I have made some minor changes to your PR. As long as you add links to the side navigation bar, I think we are good to go.

@ArseniiPetrovich
Copy link
Contributor Author

@longfeiWan9 @xBalbinus
I think we should be good now

@longfeiWan9 longfeiWan9 merged commit d4bca8d into filecoin-project:main Dec 3, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants