The Graph and Farcaster Frames: Powering Onchain Data Needs With Subgraphs

In recent weeks Farcaster unveiled Frames, a new feature that has ignited a surge of excitement within the web3 builder community. The functionality is simple yet powerful: Frames empower users to infuse programmable interactivity into their posts, opening doors to a multitude of creative possibilities. A great beginner’s example would be embedding a poll: Post a question on Farcaster and encourage your followers to select an answer within a multiple-choice interactive Frame. From there, use cases can get more interesting.

With programmable interactivity, a multitude of creative possibilities are unleashed.  Since the release of Frames, builders have already experimented with various use cases such as  direct NFT mints from the timeline, voting on Safe proposals, a scavenger hunt, incorporating a Punk sales tracker and more. And because Frames are based on an open standard, other protocols soon followed suit , embracing the concept: Lens with Lens Portals and XMTP Frames.

Now, how does The Graph come into play with this new web3 primitive?

Most Frames have onchain data needs. A NFT mint Frame might want to verify if the connected user has already minted, whereas some Frames have token-gated functionality. Others simply wish to display some kind of organized and up-to-date onchain data. That’s where developers can tap in The Graph to build with confidence: by providing seamless access to onchain data using subgraphs.

With a plethora of existing subgraphs already published on The Graph Network, developers can easily tap into these resources to fulfill their data requirements. And in cases where a suitable subgraph doesn't exist, creating one tailored to specific needs is a straightforward process, thanks to The Graph's intuitive infrastructure.

What sets The Graph apart is not just its accessibility, but also the economic guarantee it offers through Indexers' stake. This ensures a higher level of trust and integrity in the data retrieved, giving developers peace of mind as they integrate onchain information into their Frames. Additionally, querying data from The Graph Network is intuitive and efficient, making it the preferred choice for developers seeking reliable data sources.

The Graph + Farcaster Frames in action

This isn’t a hypothetical think piece of how you might theoretically be able to integrate data from The Graph into Farcaster Frames. In fact, there are already some very interesting examples from a recent Farcaster Bounty hosted by The Graph that show real world examples of Frames that leverage The Graph for onchain data.

Take a look at the winners:

1st Place: 3070 implemented an NFT browser inside a Frame. It queries the NFT subgraphs on Ethereum and Base. Check it out live on Farcaster and view the source code on GitHub.

2nd Place: Hashir and Shiyas created a Frame that can look up the activity of an Ethereum address on POAP, ENS, Uniswap, NFTs and Lens. Try it out and read the source on GitHub.

3rd Placelimone.eth, a serial Frames hacker, built a Frame that can vote on onchain proposals. A Safe would then execute if the quorum is met. Check it out on Warpcast and view the source code on GitHub.

If you caught the Frames bug too and want to get your hands dirty, check out the example repo from me, Simon to quickly build a Frame that queries The Graph. Or look through awesome-frames for more inspiration.

Connect with Simon on Warpcast or on X to share your thoughts!

About The Graph

The Graph is the source of data and information for the decentralized internet. As the original decentralized data marketplace that introduced and standardized subgraphs, The Graph has become web3’s method of indexing and accessing blockchain data. Since its launch in 2018, tens of thousands of developers have built subgraphs for dapps across 45+ blockchains - including  Ethereum, Arbitrum, Optimism, Base, Polygon, Celo, Fantom, Gnosis, and Avalanche.

As demand for data in web3 continues to grow, The Graph enters a New Era with a more expansive vision including new data services and query languages, ensuring the decentralized protocol can serve any use case - now and into the future.

Discover more about how The Graph is shaping the future of decentralized physical infrastructure networks (DePIN) and stay connected with the community. Follow The Graph on X, LinkedIn, Instagram, Facebook, Reddit, and Medium. Join the community on The Graph’s Telegram, join technical discussions on The Graph’s Discord.

The Graph Foundation oversees The Graph Network. The Graph Foundation is overseen by the Technical Council. Edge & Node, StreamingFast, Semiotic Labs, The Guild, Messari, GraphOps, Pinax and Geo are eight of the many organizations within The Graph ecosystem.


Category
Graph Builders
Author
Simon Emanuel Schmid
Published
February 20, 2024

Simon Emanuel Schmid

View all blog posts