Scaling Subgraph Collaboration with the Graph
Listen Now
About This Episode
This episode of DevNTell, hosted by Narb, features Nena Djaja from Edge & Node and The Graph. Nena presents a newly released feature that enables the transfer of subgraph ownership using NFT contracts. Subgraphs, which are open APIs used to query blockchain data, can now be minted as NFTs, facilitating collaboration and easier management. The demonstration covers the entire process: publishing a subgraph to the mainnet, transferring ownership through the Subgraph Studio, and verifying the new ownership on OpenSea. Nena highlights how this feature supports decentralized governance by allowing subgraphs to be owned and transferred by DAOs or multi-sig wallets. The session concludes with a Q&A where Nena discusses user roles within the ecosystem, future plans for supporting mutations, and the importance of user feedback in product development.
Key Takeaways
The Graph has introduced a feature where subgraphs are minted as NFTs, making ownership easily transferable.
Subgraph ownership can now be transferred directly through Subgraph Studio or via secondary markets like OpenSea.
This update is crucial for DAOs and collaborative teams, as it allows ownership to reside in a collective address rather than an individual's wallet.
There are multiple ways to engage with The Graph's ecosystem, including roles like subgraph developers, indexers, curators, and delegators.
User feedback through Discord and the official forum is a primary driver for new features and improvements at Edge & Node.
Featured Guest
Nena Djaja
Product Manager @ The Graph
Timestamps(click to jump)
Episode Transcript
Read full transcriptHide transcript
GM, GA, GE everybody. Welcome to a special edition of DevNTell, Web3Con style. So, if you did not know, DevNTell is a Developer DAO initiative where it's a 30-minute window for members of the DAO to showcase something they are passionate about or been working on. This can be an awesome project you've been working on, demonstrating unit test best practices, automation goodies, smart contracts, how to structure projects, etc. Basically, if you've got a passion for something, this is your opportunity to share it with the community. And this week, in the spirit of Web3Con, we have Nena from Edge & Node and The Graph here to show us a really cool new feature they've just released. So Nena, handing it off to you.
Hi everybody, nice to be here. Let me just do a quick intro about me. So, I've been the Product Engineering Lead at Edge & Node, but I've been with The Graph for almost four years since we were a really little startup. And I was a developer myself for many years, and then last year I built the team, and I have an amazing team who I like to give a lot of credit for all these features that they were building. And so, I became Product Engineering Lead. And so, you guys might be familiar with subgraphs, but I just wanted to kind of give a little bit of intro before I jump into the feature. So subgraphs essentially are these projects that developers build, and they represent open APIs that enable users to query data from different blockchains. And so developers would define a GraphQL schema, a subgraph manifest, and a bunch of other things. And then they could deploy them to our decentralized network.
And I'm just going to start screen sharing because I feel visuals oftentimes speak better than words. And so here are subgraphs on the decentralized network. There's plenty of them. And if you want to, I guess, there is I think a lot of open-source subgraph code out there to kind of get started. And we also have a CLI command that kind of creates an initial scaffold of a subgraph to get started. So every subgraph essentially has an owner, and that's the Ethereum address that we show right here. And so what we have is the GNS contract that we call to publish a subgraph. And since it was just an ERC-20 contract, it wasn't in the past, you wouldn't be able to transfer this subgraph. It would belong to the person who created, developed, and deployed and published this subgraph. So what we did essentially, the smart contracts team that we collaborated with, we created an NFT contract. So now every time a person creates a subgraph, an NFT is minted. And I'll show you our collection. And that subgraph can easily be transferred to a DAO, to a multi-sig, so it can enable further collaboration on it. And I think it's a pretty cool thing. And here you can see our collection on OpenSea, and these are all the subgraphs that were on the network that we migrated over once we launched this feature. And so I can show you, I actually recorded a video just because you never know how a live demo is going to go. Do you guys see my video screen?
Yes.
Right, so this is my subgraph. So what I showed is Explorer, which are the subgraphs kind of more of a browsing experience. But in Subgraph Studio, which is another product we develop, you create subgraphs and deploy them easily. And this is the one that's published to mainnet, and it's version one. And I'll play the video, but I'm just going to pause to explain a couple of things because it goes really fast. And here in these three dots, you can just click on Transfer Ownership, select the address, we validate that it's a valid address, transfer. Gas was low when I was recording this. And we just put a note here that transferring a subgraph is irreversible. Make sure you know what you're doing. We have a little bit of docs. Although, when I was looking at this, I was also thinking if you transfer a subgraph to your friend, for example, and then they want to transfer it back to you, that is doable. But in general... okay, cool. So what's happening here, the transaction was successful, and we bring you back to... so with this particular test account, I have no other subgraphs. So now it doesn't belong to me anymore, and I can't see it on this screen. But I'm going to actually log out and log in with my other Metamask account because I'm just transferring to myself here and show that now on my other account, I can actually see it. And now that other account is the new owner of it. So there is the little subgraph.
So let me get out of this screen and just show a couple of other things. So here I am logged into... or not... okay, it... oh no, sorry. This is in Explorer. In Studio, let me... I'm logged in with that account, and I can now see the subgraph that's transferred to me. And here in Explorer, we can see the new owner here. And just one small... and also on OpenSea, I can see the same subgraph owned by me now. And I just want to mention here, people might know, but you can also transfer it on OpenSea. The same thing, just paste the address and transfer it here. One quick thing I just want to mention because it kind of happened to me is that... and I left this kind of on purpose. I changed some metadata because should have been more original here. But anyway, I put... and when you update the details here, it's another contract transaction. It doesn't automatically update on OpenSea. So actually you need to, even if it's like a few days after, so actually you would need to click here, refresh, and then refresh it here to kind of see your new updated metadata. So yeah, this is kind of the main part of my demo. But I think this is pretty cool because I feel like people can collaborate easier. It's easier to would be easier to maintain a subgraph. And then let's say somebody leaves a DAO, they can transfer it to another address. And then subgraphs that are owned by DAO addresses, the transfer could be part of proposals and things like that.
This was great, Nena. Thank you so much. I guess one question from me is what was the inspiration to kind of get this feature out there? Like what drove The Graph Edge & Node to kind of get this out there?
User feedback. A lot of users requesting, and we listen to our users, or at least try our best. And there is a forum.thegraph.com, and I think that's where people kind of started posting and wanting us to build this. So yeah, that was what kind of kicked it all off.
Awesome, awesome. Gang, does anybody have any questions for Nena?
What's the easiest way to get started in the sort of Graph ecosystem? Like, I know that you can build subgraphs but there's a couple of other different levels of activity that you could do. As a builder, what's like the easiest way to get involved in The Graph ecosystem?
Oh, that's a great question. There are different roles that you can get involved in. As a developer, you can definitely get involved as a subgraph developer. You could also get involved as an indexer. And we have a lot of support for indexers. I think you also you might notice our Discord where you can join the indexer channel. So it depends what you want. So as a subgraph developer, we have a lot of documentation if you, let's say, look around our docs and like learn a little bit about different roles and figure out... let's say you want to build a subgraph. So then we kind of guide you through what I was showing a little bit, like you go through Subgraph Studio and we create this kind of initial scaffold and maybe you could look up... and then you decide which contracts do you want the subgraph to index. And also join the channel to get community help. There's also Graph Academy that provides a lot of good videos and tutorials on how to do things. And other than developers and indexers that are more kind of very technical roles, you could get involved as a curator, when you would curate subgraphs that you want them to be indexed. And you could also get involved as a delegator when you essentially lend your GRT to indexers.
Nice. Like, three of those roles are like supply-side, right? And then you have like users that pay GRT to use what people are indexing and providing the network. Right. Sorry, I didn't hear the last... can you say a little more detail, those... the indexers?
Sorry, badly worded question. The... there's like four kind of groups of roles, right, for The Graph? Like three of them are like supply-side that like make the network work, and then you we can also utilize the network like querying it, right?
Right. You can utilize... exactly, dApp developer, was going to mention that. Yeah, exactly. You can utilize the network, develop dApps, use different subgraphs and things like that for sure. You can also get involved... I mean there's many ways. We give grants. The Graph Foundation gives grants to people to improve our ecosystem. There's also an advocacy program that we have that you can get involved in. We just recently launched it. So yeah, there are several ways. But yeah, please build more dApps for tools that we need out there.
Yeah, for sure. Nena, I have a question about The Graph. I actually have two questions. I'll start with the first one. The first one is, when are you guys planning on supporting mutations? I saw that there's like a couple like references of it and like it just seems like a super interesting use case.
Yeah, I love that question and I care about that question too. That was like my internal question as well. But we have Core Devs now that are onboarding in that are working on that feature. I can't tell you exactly when because like... but it will come. It will be soonish. I know that it's been kind of in the works.
Got it. Perfect. And then for my second question... so one of the things I was curious about, like I'm building a subgraph right now for our app in the hackathon. One of the questions I have is, is there a way... like is there... like I see there's like some generated... like code generation. I was wondering like for the GraphQL schema, you have to essentially type out yourself and you map it yourself. Do you know of any tools that like handle that mapping like itself?
That's a good question. Hold on, I just recently saw some... where was it... generated schema. You mean to define from the mapping to define your schema? Exactly, yeah, so from the ABI mapping. Because you're already having the types there and a lot of times you don't really need to do any custom mapping at that point. I was wondering if there was like code generation at that level, you know what I mean? Very good, yeah, very good question. You know what, why don't you ask... I'm not 100% sure but I know I saw something that looked like it had generated, automatically generated schema rather than like handwritten. Why don't you ask in the Graph community, there's like subgraph developers channel and people are pretty responsive. So what I would do is just ask there.
Cool. Thank you.
Great questions here, gang. Any others?
I've got another. It's about the grant program, if that's okay. Are there any like specific things that you're looking to fund at the moment? Or is it kind of more open and anything that sort of fits into The Graph's ecosystem?
I'd say it's more open, it's things that fit in The Graph ecosystem. Having said that, I'm not sure if we just fund particular... you know what, there's actually when you go to the blog, there's a couple of blog posts with the projects that we just funded. I think there is two or three and then you can see a list of projects and type of project that we fund. Because I don't want to speak... I don't know exactly how the foundation filters people, but I would say we're pretty open but I would still look into that before applying to see if you fit into that.
Awesome. Thanks.
A follow-up to that question actually, that was a good question. I was wondering it'd be kind of... like this is more feedback, it'd be cool to see like you know like how Y Combinator has like a request for startups for grants because that would be like to like help people get started in this ecosystem. Because it's a super interesting ecosystem. Yes, that is a good idea. You mean to build something that people can just go there and request? Yeah, so like more like a post about like what they're looking for and like what the foundation is looking for on more of like a request for startup. There's like a really good example... yeah, I would want to ask... yeah, that's a good thing. Let me ask Eva and then I can post it in one of the channels, just tell me which one. Because there might be.
I guess a question for me... so regarding costs to query subgraphs, is it... are those costs set by the indexers or... and on average what do you see as like the average transaction cost per query? That's a very complicated question. Sorry. It depends, it depends on the complexity of the query. Indexers are setting how much of the query fees are, depending on the parameters such as query fee cut, they are setting how much of the query fees will belong to them versus the curators and other things. But I can also point you to blog posts that explain that in a little bit of detail. I'll share that as well. It's not a simple answer and I don't know myself all the details how that whole mechanism works. But yeah, that's a good question. We were actually just kind of have something in works where we can let people decide whether they want to maximize the low price or the efficiency of the query and set different parameters because it all kind of plays a role.
Gotcha, gotcha. And I guess from a consumption standpoint, is querying a subgraph... like is there a caching mechanism on your end so that the transactions kind or the queries are returned in a quick manner? And like as a developer, should we be caching these responses on our end since the event logs that are emitted are kind of they are what they are until they get updated? So is there any guidance there on how often we should be refreshing our data if we are caching?
Yeah, that's an interesting question. I'm not sure if there is something caching at the moment on the subgraph side. On the frontend applications that we build, we do some caching on the frontend. In particular, we use Apollo and Apollo cache. But yeah, I'm not 100% sure if it's implemented from the other side. Cool, cool. Yeah, basically in my mind it's whether or not if I'm querying a subgraph if I should be hitting up a network call for every call or if I can save on some network calls by caching. But yeah, something to explore for sure. Yeah, definitely. You could also ask that in the subgraph channel on the subgraph developers channel on the chat. For sure. Yeah, but on the frontend side like I said, on the frontend we do use a cache. Sweet. Makes sense.
We have about 11 minutes left here, gang. Are there any last questions or questions for Nena?
Question for Nena, this is more like career-related. So I notice that your title says Product Engineering Lead, so I was wondering if you could touch upon like how you found yourself in that role and the types of engineers that you would want to work with and would succeed in a role like yours. Yes, good question. How I found myself in that role or any role, I just stumbled upon it because we were an early-stage startup and I essentially did all the things. And so I did kind of a bunch of what leads do is kind of do cross-team dependencies, collaborate on features, make sure it gets out and things like that. And then once we started hiring more developers, it made sense to me to I just stop having time to code. And I wanted to build my team and empower them and encourage them and give them everything they need to perform at their best essentially. And so I just kind of naturally transitioned into a lead position and I'm still learning and improving. But what I'm looking for people is people who are resourceful, kind of because we are all working in different time zones. And so we don't overlap at all times. So what it would take for our team, and I have a really great team, I love my team, is everybody comes up with ideas, shares them, tries to implement, tries to improve things, everybody is really passionate about what we are building, and I just give them a lot of freedom and needed resources to succeed.
Awesome, thanks. And then I guess another question would be like what are some interesting like differences you notice in terms of, you know, looking at user feedback or sourcing that from like the Web3 space versus your past experiences at other Web2 companies? Right, yes. I've spent many years at Web2 companies prior to kind of jumping into Web3. It's very chatty in Web3. We have a lot of chat, like I said on Discord, even early on we're just trying to build things and keeping on our chats and we were all kind of trying to see what people need and what users want us to build and we really listen to that feedback. So I guess the main difference is that people are very freely giving feedback and have access to us in Web3, which is great. It's great for them, for us like we keep ourselves busy all the time. I love that we talk to users and I love that there're different opportunities to share their feedback and we actually do implement it, maybe not right away, but we talk about it and we kind of let our users help us with what are we going to build and how to improve it. Yeah, this sort of collaboration seems much stronger in the Web3 space. Yeah, totally. Thank you.
I guess on the topic of feedback, what's the best way for folks to give you that feedback? Just hop in your Discord or... yeah, I would say hop in Discord. You could post in the forum and then kind of create more of a conversation when other people can comment, like people post different proposals there. There's also depending on what feedback is on, I know we have open-source repos on GitHub where people create issues. So kind of like maybe a combination of those. Let's say you post a forum post and then like share it on Discord to get other people's take on that. And yeah, those are I think the best ones. Sometimes people also send an email to I don't even know which address, I think it's somewhere. Sorry, I can't help there, but I know I do receive feedback, it gets forwarded to me if it's like a product feedback. But we do monitor Discord. Excellent, excellent.
And Nena, I thought I would just mention that as part of your sponsorship, the job board is now live. So the Edge & Node jobs that were sent through to us are live on that job board, or on Edge & Node's own website if you want to go check them out. Rocket emojis. So which job posted... is it a specific job posting? It's the ones you have on your website, we replicated on to our job board and then we've shared them with all the conference attendees and I've just put it in the text chat if anyone wants to go have a look. Okay cool, yes. Yes, the jobs we have the jobs we had on our sites are still active. We are kind of actively hiring and looking for passionate people.
I did have one question, what feedback specifically like what keywords or ideas from the comments generated the need in your eyes or your vision to make the product? To make in general our two products? Yes. Let me think, that was a way back in the past when we were thinking about having something like this because we evolved over time. So originally we launched Explorer, or originally we launched hosted service which is was kind of like one indexer to try to do proof of concept of for the decentralized network. And then as subgraphs kind of became more and more important, we were trying to figure out how to make it easier for subgraph developers to develop subgraphs and get started. We kind of noticed the need and I honestly sorry I can't remember exactly like there must have been also somewhere in chats because like a long time ago we were brainstorming it until it actually came to life.
We noticed the need to have some sort of like a playground, like a developer playground because essentially you can't to have something where you don't need to put your subgraph on-chain and pay the fees right away. So in Studio, we do use a database, you deploy your subgraphs, you see what they look like, you try to query them in the playground, see if that's what you intended to do, you can also deploy multiple versions without having to kind of directly publish them all on-chain. And then like when you're happy, you publish them on-chain. So we kind of envisioned some sort of a tool like that for a while. And then ever since we launched it, we keep actually getting a lot of feedback and we've been building more features like we adding multi-sig, which we didn't kind of support at the beginning. Then we also another use case for Studio was we noticed you need to manage your API keys somewhere, so we added that onto Studio. And then there is also billing that we will improve, that we use Polygon bridge. So kind of made sense for all those features to live in Studio because they are related. So I don't know if that even answers your questions, but it was like the evolution of things. Yeah, definitely get that.
All right. We're almost at the top of the hour. Are there any final questions? Going once. Going twice. All right. Guess not. Well, thank you again very much, Nena. We really appreciate you coming on and having this talk with us. It was very insightful and I'm sure a lot of folks here are knees deep hacking away with The Graph and subgraphs and this was a fantastic insight into the overall Graph ecosystem and the new NFT feature. And special shoutout to Eva, I think she is in here for helping connect both of us more or less to make this happen.
Yes, thank you, Eva, for sending me everything I needed and making it easy for me to join. Awesome. Well, thank you so much for having me. This was really nice and yeah, please turn our Discord and ask your questions there and we'll answer them. Thank you.
Awesome. All right gang, all the best and see you at Web3Con. All right.
Listen On
Resources & Links
Share This Episode
Share on XWatch Episodes Live!
Subscribe to our event calendar and never miss a live episode.
View Event Calendar