Yeah, so this is a Mongo example. Here we call it MongoDB. We give it a name, pass in all the credentials. Again, this is HTTP-based, so this is using MongoDB Atlas for this. We then can create those constraints around our documents. So we can say here, we're going to say this is an address, as these fields, and then we have a user, which has an address, which has a reference. And we can do things like JSON fields, give it the collection name, and then attach it as a data source, which is pretty cool.
And yeah, another example here is Contentful. There's an example guide on the Graphbase website. I'll share this in the chat because it's pretty cool. But one thing that we see a lot of users doing is adding their existing GraphQL APIs, adding edge caching, and then extending those APIs with their custom code. So it doesn't matter what GraphQL API that you're using, you can just add it to Graphbase, remove the namespace, and everything should just work as normal. All you'd need to do is change the endpoint. So this guide here, I'll leave a link in the chat, OpenAPI would work similar to generating types from an OpenAPI specs run. Yep, very similar idea. I think the biggest thing with OpenAPI is the spec, it can be so easily, quickly abused. And we've seen this generate in the connector, is people try to follow it, but then, I don't know why but people either, I've done this myself, is you create a spec, and it's very easy to just not mention things in the spec or not use certain fields or keys, which is totally valid by OpenAPI spec because it's quite a lot of ambiguity and optional stuff that it makes it really hard to rely on that stuff to create the best experience. So we have an OpenAPI connector which can introspect the OpenAPI spec, and there's a way you can transform that as well. So you could say, use a different name, name a convention based on whatever you've got in the spec, because honestly there's so much stuff that just gets forgotten in those specs. And what I really like about GraphQL is, it's a very concise spec, and it's very hard to abuse it. I love the spec for that reason. GraphQL itself is pretty cool. I think it's a really good implementation, and it finds itself in a cool space when it comes to federating all of your different services into a single GraphQL API. That is super powerful, but I think the specification itself is so good. It's so, so good because it's, like I say, very, very restrictive in what you can do. But yeah, this is what I was talking about before. We're using Contentful. We create some stuff in Contentful for properties, and then we publish that, then we create a GraphQL backend. And then this is a ... The concept of this guide is actually properties that belong in Contentful. You want to make a query to fetch those, but then you want to get the current weather about the properties inside of Contentful. Now, Contentful has no idea about the weather and you can't extend that API, but with GraphBase, we're able to add a proxy in front of Contentful that's able to extend a field in a query from Contentful, which is super cool and it works locally as well. We then just kind of use the values from the query, pass our API keys to our weather API and then we'll return the data. Honestly, this is the best thing. I love this kind of stuff with GraphBase. So, yeah, there's many other use cases.
My resolutions are a bit, but I mentioned branching and instant preview branching earlier. So any change you make and commit that you make to your branch with GitHub will automatically deploy a preview for you. So, I go to my dashboard now and we just go to this project here. If I open the Git repository, if I make any changes to this repo, it's going to redeploy this project, which is pretty cool. And any analytics, there'll be nothing that goes on in this project because it's not used. It's just a demo. So, yeah, any change you make, you can see all the different kind of changes that were made in here, which is pretty cool.
So, yeah, please do let me know if there's any comments. We'll probably wrap up in about eight minutes or so. But I just wanted to use the time today really just to kind of show a few of those things within GraphBase that you're able to do. Kind of coming back to what we were talking about at the very beginning, what we've been able to accomplish in a very short space of time actually is adding different data sources. And, you know, like I said, this could be a CMS, could be an API, send an SMS, eCommerce, or payments or whatever. When you need to retrieve that data or update that data or whatever, and you want to either extend or cache that and make it faster, you no longer have to go and pay to replicate data. We'll replicate that for you.
Comments