✨ Optimizing Your Subgraph: Final Touches for Production-Ready Performance
Enhancing functionality, clarity, and efficiency for your subgraph.
Creating a subgraph that is both functional and aesthetically pleasing is helpful for engaging users and developers. In this post, we’ll explore how adding proper descriptions, a website link, source code, and a standout photo can make your subgraph more user-friendly and appealing.
Anyone can deploy a subgraph; for example, there are many Uniswap subgraphs. This can cause confusion, making it difficult for users to know that yours is the official subgraph for your project. By adding extra information, such as a description or photo, can help your subgraph stand out from the pack. Plus, adding features and descriptions to the schema right away is easier than doing it later. While none of these are requirements, they can be very helpful. This blog will explain how.
1. Adding a Photo to Stand Out in the Graph Explorer
Adding a photo helps your subgraph visually stand out and makes it easier for users to find. A little free advertisment certainly can’t hurt either.
Why it’s important:
A standout photo makes your subgraph visually distinct, attracts more attention, and prevents it from blending in with others. Otherwise, if no image is added, the default image will make your subgraph disappear in the crowd.
How to add a photo:
Choose an image that represents your subgraph or protocol. The image should be clear, relevant, and visually appealing.
When you’re setting up your initial subgraph, click on the image box icon next to the name:
This brings up a box so you can add whichever icon you choose.
2. Adding a Description of What Your Subgraph Does
One of the key elements to make your subgraph user-friendly is a clear and concise description. You can even choose a quick description of your project.
Why it’s important:
Adding a description helps users understand the purpose of your subgraph at a glance, encouraging more people to use it.
How to add a description:
When crafting your description in Subgraph Studio, focus on providing clear and concise details. Highlight key features or use-cases that make your subgraph unique or beneficial.
3. Including a Website Link
Including a website link allows users to easily access more information or related resources about your protocol or project.
Why it’s important:
Directing users to more information enhances the credibility of your subgraph. If you have a project website, link to it. Alternatively, link to relevant information about the subgraph or documentation.
How to include a website:
Simply add the URL of your project website or relevant information in the designated section. This will help users explore further.
Underneath, you can also choose a category to help others filter when searching within the Graph Explorer.
4. Linking to Source Code or GitHub
Providing access to your subgraph’s source code is beneficial for transparency and collaboration.
Why it’s important:
Linking to your source code helps other developers learn from or contribute to your project. It also adds credibility and encourages community involvement.
How to include the source code:
Add a link to your public repository, such as on GitHub. Ensure the repository is well-organized and documented, making it easier for others to understand and contribute. You should insert the exact link that leads others to this specific subgraph on Github (not a generic main Github page) so that they don’t have to spend time searching.
5. Putting Descriptions in Your Schema
Adding descriptions can help others better understand your work.
Why it’s important:
Descriptions make the schema easier to understand and help other developers work with your subgraph. They also show up in the playground in Graph Explorer when you hover over an entity, helping others understand queries.
How to add descriptions:
Use simple and descriptive language. Explain the purpose of each field and type, making it clear for others to understand and use.
Above each entity you can provide a brief explanation within quotations. These will not affect your schema, but will help others later when attempting to use your subgraph.
6. Documenting Your Subgraph in Developer Docs
Documenting your subgraph within your developer documentation is a crucial step that can benefit both current and future developers.
Why it’s important:
Documenting your subgraph helps other developers understand its purpose, functionality, and integration points. It provides a clear reference for those who might want to build on or interact with your subgraph in the future.
How to document your subgraph:
Include clear explanations of your subgraph’s features, endpoints, and use cases within your developer documentation.
One great example of Subgraph Documentation is from the project Silo Finance. They provide links to each one of their subgraphs, helpful tips and tutorials, a detailed display of their Schema, and also query examples.
If you upgrade your subgraph from hosted network, don’t forget to change your link to your new decentralized network as well.
Final Thoughts
Implementing these enhancements will make your subgraph more user-friendly and appealing. By adding proper descriptions, a website link, source code, and a standout photo, you create a more engaging experience for users and developers. It’s best to implement these changes while the subgraph is fresh in your mind, as revisiting it later can be cumbersome. Start improving the aesthetics of your subgraph today and make it stand out in the Graph Explorer!
About Graphtronauts:
Our goal is to educate the broader crypto community and help them become contributing members within The Graph ecosystem. Our indexer is live on The Graph, and you can read our official launch announcement here.
If you want to delegate to us, you can do so directly in the Graph Explorer by clicking:
Stay Connected:
If you have any questions, concerns, or feedback, you can reach out to us using our social channels:
- App: graphtronauts.app
- Telegram: t.me/graphtronauts
- Twitter: twitter.com/graphtronauts_c
- YouTube: youtube.com/@graphtronauts
- Blog: blog.graphtronauts.com
- Warpcast: warpcast.com/~/channel/graphtronauts
- Reddit: reddit.com/r/Graphtronauts
- LinkedIn: linkedin.com/company/graphtronauts
Graphtronauts Indexer:
You can also contact us through our dedicated social channels for the Indexer operation:
- Twitter: @graphtronauts_x
- Discord: Join our Server
- Telegram: @GraphtronautsIndexer