(Snowpal Podcast: Part 5/N) Salesforce: Anypoint DataGraph
According to MuleSoft Documentation, “Anypoint DataGraph enables you to connect those graphs into one unified schema that runs as a single SaaS GraphQL endpoint and contains and links all of the fields defined within all of your APIs”.
In this podcast episode, Krish explores Salesforce Data Graph and its integration with MuleSoft. He starts by providing an introduction to Salesforce and his personal experience with the platform. He then dives into exploring Data Graph, including authentication policies and custom headers. He demonstrates how to update the unified schema and troubleshoot issues with API and asset versions. He also discusses the fundamental concepts of Data Graph and differentiates it from MuleSoft Data Graph.
Krish goes on to run queries and mutations and discusses real-world use cases for Data Graph. He explores the concept of working with multiple endpoints in GraphQL and how it can be used to integrate multiple APIs. He discusses the potential benefits and challenges of this approach and shares his skepticism until he has had a chance to test it thoroughly. He also explains the unified data graph schema and its promise of simplifying API integration.
Krish concludes the conversation by summarizing the key points discussed and inviting listeners to explore the AWS APIs for their backend needs.
Go to Part 4.
Part 5
Transcript
Krish (aws.snowpal.com) (00:02.05)
Hey there, hope you’re doing well. Welcome to Snowpal Software Development and Architecture podcast. This is podcast five in the Salesforce series. If you haven’t seen the previous ones, I highly recommend that you do so, because you know, we’re just gonna kind of pick up from where we left off there. Let me do some screen share and we’ll get started without further ado. So let me…
my entire screen here okay
Krish (aws.snowpal.com) (00:34.138)
Okay, so let’s see the last, in the fourth one, we actually looked at the code builder. We played around with it, created some examples. We looked at the design center and the exchanges well, right? So these were the three things we looked at the highest level. We created this hello world, we published it, did some customizations, created some endpoints and so on and so forth.
Let’s just keep going. Again, if you haven’t watched the other three or four, I highly recommend you do so. By virtue of introduction, at least to this series, I’ve not done much work in the area of Salesforce, except barring a couple of integrations I did a while ago. So about three to four months, if that. I haven’t done a significant amount of work on this platform. On Salesforce, I was just curious because people asked me some questions about it recently. I was like,
Okay, why not just give it a look and see, give my initial, you know, my two cents. And if you haven’t used this platform, maybe my hope is that the series actually helps you get acquainted, sort of get acclimated to the user interface, the process, and to the extent possible. And I like pretty much as is the case with all of my podcasts, I come, hit record, and then start figuring this out as we go.
along with you except that you’re not here but I do it that way so if you’re expecting a more traditional form of teaching and tutorial this is not going to be it but if you’ve enjoyed the other podcast then I hope you continue to enjoy I hope that you’ll enjoy this one as well because it’s going to be along those same lines okay now that it is recording let’s actually go to let’s go to data graph right let’s see what that is again I’ve not seen any of this ever before so I’m looking at
as I’m recording, right? So we’re gonna make some mistakes, plenty of mistakes, discover, find our ways out of there, and then have some understanding of what these things are. That’s the idea, to kind of understand and have fun in the process. Okay, and also one more thing to add is, I think we did look at the data view, if I remember correctly, the DSL language in the last, one of the last podcasts, and I thought it was a good experience where…
Krish (aws.snowpal.com) (02:55.266)
I had never heard of that before. We just tried it out, played for it a bit. And at the end of the 30 minutes, I think we came out of it with a fair understanding of how to use a write code in that DSL. Let’s just take that similar approach here, right? Datagraph, absolutely no idea what that is. Let’s see what it says here. Start building your unified schema. Before creating your schema, we first need to get an API added. I think we already created one, so we should be able to use this.
is configure URL and pick all the defaults.
Krish (aws.snowpal.com) (03:34.89)
Okay, it says everything looks good. Get an existing URL from the platform or add a new URL.
Krish (aws.snowpal.com) (03:45.49)
Okay, this is for when the API is being managed in API manager or if the API URL has been manually added to exchange. You would choose a new URL if there’s, choose this option if you wanna manually add a URL for this API. Let’s just go with the default here, right? I’m not even gonna edit that. I’m gonna click next. Authentication policy. We had seen that, let’s see if, oops.
actually should have moved it here, but that’s all right. Let me actually do that.
Krish (aws.snowpal.com) (04:20.738)
here.
Krish (aws.snowpal.com) (04:25.454)
here. Yep. Okay. Let’s see the auth policy. Trying to think where we were at with the previous one. Yep, I remember that. We used a couple of different methods to do this. We had an auth header called MS2 authorization. This actually will not work now because the session would have expired. But again, I’ll replace it. We added an environment variable for authorization.
and then we used it here. Let’s run this and it’s gonna say, of course it expired, right? So let’s actually, I’m not gonna update it right now. So let’s see what, let’s go, should we, I’m trying to understand what relevance it has to do with the endpoint security that we actually supported. Let’s just go with, let’s see.
Krish (aws.snowpal.com) (05:20.13)
Basic Auth, Client ID, Custom Headers. I would wanna go with Custom Headers. Let’s just pick Custom Headers, right? Okay. It’s picking up the password. I totally don’t wanna show it. So let’s just do a new Auth right for now. Preview schema.
Krish (aws.snowpal.com) (05:45.746)
Okay, let’s see. I’m just gonna click next here.
Krish (aws.snowpal.com) (05:53.934)
I’m just curious suddenly, let’s see what data graph, Salesforce, looks like we’ve done a lot of this before, so I wanna understand what their product is. Data graphs are a way to visualize the data you’re available, blah, blah. Okay, you know what, before we do any reading, let’s keep going, let’s see what happens here. Okay, I’m not gonna edit, it says rename, change to.
new greeting just get a name
like the underscore, rename method, new, creating one, change both of them. Just gonna click on, we are updating the unified schema as we take up to 15 minutes. See, it’s 15 minutes. Given that we don’t have much going on here, let’s see how long this actually takes.
Hopefully it doesn’t take 15 minutes, otherwise I’ll have to twirl my thumbs and look at this, but maybe we’ll do some more discovery in the meantime. So it has the environment status, it’s still doing it. This is the graph QL. Ah, the data, okay. So we added a restful endpoint. This seems to provide a graph equivalent. Maybe the data graph is essentially creating a graph equivalent of the rest endpoint that we added. Let’s…
See ya.
Krish (aws.snowpal.com) (07:32.078)
That’s kind of what it looks like to me. Let’s see, list of APIs added. We added a couple of them. Settings, number of calls. OK, we don’t need to worry about those. Let’s just wait a minute. OK, fundamental concepts.
Krish (aws.snowpal.com) (07:53.303)
Let’s see, level one Nester types, unified schema.
collaboration, linking, and then merging. Okay, I’m not gonna play those videos right now. Let’s see, while it does that in the background, let’s try to read up a little bit. Salesforce data graph.
Krish (aws.snowpal.com) (08:26.93)
Einstein Copilot, what is Einstein?
Krish (aws.snowpal.com) (08:36.094)
Conversation AI assistant every CRM application. OK.
Krish (aws.snowpal.com) (08:45.206)
What are data graphs? When designing prompts in Prom Builder, assigning skills you may need to check, blah, blah. Data graphs and data cloud enable you to visualize the relationship between data model objects. Yeah, I think this maybe it’s a different data graph than the one we are actually looking at. Yeah, I have a feeling that data graph is, this is MuleSoft data graphed, let’s see.
MuleSoft data graph.
Yep, this is probably completely a different product. So I guess sales was presumed acquired in MuleSoft. Probably there are products of the same name. So that’s a little bit confusing. What is Datagraph? Every time you add a new API to your network, AnyPoint stores it as a graph metadata. Datagraph enables you to connect those graphs into one schema that runs as a single SAS GraphQL endpoint and contains the links, all of the fields defined within all of your APIs. That’s actually…
Interesting. We only have, oh, I think it is done this time. Let’s try to figure this out. We only have a single API, but it looks like we can actually be, we could possibly be using this for multiple APIs. Let’s see. Well, it’s the same one. Maybe we should create a second API. Let’s go back here. Hello, old API.
here.
Krish (aws.snowpal.com) (10:24.195)
So I can sort of duplicate this asset.
because I don’t want to go and add a new API. You know what? Forget it, that’s okay. We live with a single API. We’ll go back to Datagraph. We’ll explore the schema. So there’s two end points that we added and it says list of APIs. We could have added more APIs here if we had more in this list. Run operation. Where do you want to get access? Create a new application and use it immediately.
Okay, let’s create a new application. Let’s give it a name, snowpal, data graph.
Krish (aws.snowpal.com) (11:10.032)
We just go with the defaults. I’m not going to worry about the redirect URI and stuff like that, okay?
Krish (aws.snowpal.com) (11:23.618)
I’m not doing a lot of talking here because I’m literally discovering this as I go. And sometimes, you know, you need the moment of silence to actually digest what you’re seeing. So my apologies.
Krish (aws.snowpal.com) (11:37.49)
Okay, this is GraphQL pretty much, right? So I think based on what we read here, it says data graph enables you to connect those graphs into one unified schema that runs as a single SAS GraphQL endpoint. So if you don’t know GraphQL, the fundamental differences between how GraphQL and REST work, we can discuss that in a different podcast. But one of the differences is the fact that there is a singular endpoint, where graph exposes.
So unlike REST, we have endpoints for each of your actions with graph, you have single endpoints, and then you have queries and mutations and resolvers and whatnot. So it says that runs as a single endpoint and contains and links all of the fields defined within all of your APIs. So it unifies all of these disparate APIs. So let’s actually see new greeting. Okay, I’m gonna do that.
He’s creating.
Krish (aws.snowpal.com) (12:38.114)
Okay, I get, so I’m just writing the simplest of queries, right? And I’m not currently working on graphs. So my graph syntax is gonna obviously be a little bit rusty as well. I didn’t expect this to be graph. Otherwise I would have at least looked at, you know, one of our repos that actually uses graph, you know, we cover the gamut as far as our APIs at Snowpal is concerned. So there’s no dirt of a place to look for examples. So we have like a TypeScript graph, Mongo.
a few Mongo repos where we actually do support graph. Anyway, so I’m just printing this out. It’s spitting out the value for today’s greeting. I couldn’t run this because the token expired. Actually, let’s actually do that right.
Krish (aws.snowpal.com) (13:30.442)
Let’s actually try to go to the, let me open a new tab with this. Let’s actually make a request.
Krish (aws.snowpal.com) (13:45.186)
actually inspect this. Go to network. Let’s click send. Okay, and we’re going to go here. What are we looking for? We are looking for MS2 authorization, right? So we want to replace that bearer token from here. So let’s go get this bearer token. For the bearer token.
Replace the value. And we’ll try to make the same request and you’re gonna get a response there. Okay, it’s hello there is today’s greeting, right? Just we went back and ran the request. I’m gonna close this and then we go back here. I can close this one as well. Now we see that it returns hello there, right? Is exactly the same as what it’s returning here. Actually, why don’t we do this? Let’s go back to that API. Sorry, I closed it.
Greeting or greeting one? That’s greeting.
so we go here.
Krish (aws.snowpal.com) (14:56.134)
UI is not the best. Actually, I was not. Let me go back to, wonder if we should go to the code builder.
I think where we were the last time, maybe the design center.
Krish (aws.snowpal.com) (15:17.622)
Yep, that’s where we already talked about the ramble and opening up and all that kind of stuff, right? Let’s go here, change that hello there to, hello there, my friend.
It’s going to save the changes. Oh, we had this issue the last time. It does not. It takes a while for this change. Now it’s auto save. I don’t even know if there’s, is there a way I can actually explicitly hit save here? I don’t need to publish. I’m hitting that just so I can force that save. Now that I added my friend, they should return my friend and it sure does.
And I will go back to the data graph and then I will run the same request and I expect to see, I expected to see my friend, but it’s showing hello there. Maybe we need to.
Do we need to publish this? I don’t think so. This is publishing it to the exchange. I would assume has no bearing on where this data graph is pulling that data from. Let’s see. Let’s wait for it to do it.
Krish (aws.snowpal.com) (16:35.358)
Yeah, I didn’t think so. Yeah. So let’s see. Greeting, try it, send. Hello there, my friend. Says hello there, my friend as well. New greeting. And why is this? Let’s see. This is greeting one. Let’s go with new greeting one. And it’s not today’s greeting. I think it was tomorrow’s greeting.
Okay, that’s fine.
Krish (aws.snowpal.com) (17:10.798)
This is interesting. I’m not sure why it is actually where this is coming from. The hello there with three bangs. We updated this, it’s not there anymore. We don’t have to publish. Little bit unsure where this is picking it up from. Okay, let’s go back out of here.
It says last update 11 minutes ago because that’s when we updated this. List of APIs were added. New greeting.
Krish (aws.snowpal.com) (17:54.802)
Let me see if we can actually remove this API, right, that we added. How do I?
Let’s go to API. How do we delete this? API details.
Krish (aws.snowpal.com) (18:12.107)
version
Krish (aws.snowpal.com) (18:16.534)
There is no maybe we need to publish a newer version. I wouldn’t have thought so. Is this sharing it with your team?
Krish (aws.snowpal.com) (18:34.975)
Let me see, exchange, publish a new version. Let’s see, I’m gonna call it version 1.1, but that’s on the exchange, so that should actually have no bearing on where this is coming from. But I’m gonna still wait for it to.
Krish (aws.snowpal.com) (18:59.542)
I don’t expect that to make any difference. It says version one. What if I wanted a more recent version? I can get a graph. Explore schema. This is the graph endpoint.
Krish (aws.snowpal.com) (19:24.467)
Unified schema.
Krish (aws.snowpal.com) (19:30.922)
Nope it’s still the old one let’s go back here is there a way to remove this
Krish (aws.snowpal.com) (20:02.858)
Update version.
Krish (aws.snowpal.com) (20:08.398)
doesn’t pick up it says the current version is 1.0.0 there is an updated version according to this
Krish (aws.snowpal.com) (20:25.474)
Asset version, which is exchange set version. If it is the exchange version, then we did publish a new version to that exchange, didn’t we?
Krish (aws.snowpal.com) (20:43.791)
Actually, let’s go back here. Let’s go to the exchange
Yeah, it says updated a minute ago. It’s 1.1. It’s got the dev version. Greeting, get, send. Yeah, hello there my friend. So that is latest version.
So why is this update version not picking up?
Krish (aws.snowpal.com) (21:16.183)
It’s really get… excuse me, get out of the range.
Krish (aws.snowpal.com) (21:31.766)
rename field. It’s a bunch of mapping that’s going on here. Before we get into those details, I just want to get an idea as to where this is actually getting picked up from.
Krish (aws.snowpal.com) (21:47.03)
Hello, Alip here, 100.
Krish (aws.snowpal.com) (21:54.018)
our version was oops I closed that window maybe I should have kept it open on design center
Krish (aws.snowpal.com) (22:11.754)
where is the okay actually we should go let’s go to exchange
that shows it a bit easier. It’s v1.1. Latest in development is 20x. But then when we go back.
and go back to the data graph.
Krish (aws.snowpal.com) (22:36.926)
Do an update version. It doesn’t find.
only finds v1 the asset version whereas we clearly have
Krish (aws.snowpal.com) (22:54.335)
V1 and acid version is 1.0.0.
Krish (aws.snowpal.com) (23:02.326)
latest in development.
Krish (aws.snowpal.com) (23:17.358)
version v1 I Know what that version is that say summary v1 Whereas this is v1.1. It’s like number of these different versions is 2.001.1 v1 here, it’s a little bit confusing
Krish (aws.snowpal.com) (23:38.59)
We could ignore this and continue, but sometimes it bothers me that way too.
Krish (aws.snowpal.com) (23:49.326)
Settings, okay, that doesn’t matter. List of APIs, we already added them. And I cannot seem to figure out how to delete this API. What happens if I add it again?
Krish (aws.snowpal.com) (24:04.766)
asset version API version is 1 has it and I don’t want to duplicate it like it says here but see asset version it only picks up 1.0.0
Krish (aws.snowpal.com) (24:19.938)
There is a disconnect.
Krish (aws.snowpal.com) (24:35.534)
This is 2.0.0.
Krish (aws.snowpal.com) (24:53.002)
Fast published zero days ago.
Krish (aws.snowpal.com) (25:00.046)
So says version V1.
Krish (aws.snowpal.com) (25:07.086)
I’m going to click publish again. Let’s say V1.
Krish (aws.snowpal.com) (25:12.802)
That’s interesting when I change it to v1.1 the API version, look at the ACID version.
Change is okay. Let’s see if it.
Krish (aws.snowpal.com) (25:34.106)
Still, I don’t think this is going to change anything.
Krish (aws.snowpal.com) (25:50.582)
Yep, it doesn’t have.
Krish (aws.snowpal.com) (25:55.734)
Hmm, how do we remove this? Let’s try.
Krish (aws.snowpal.com) (26:03.306)
Only ellipsis I see is download diagnostic data, running operation, adding an API. Maybe I have to go into remove it. Let’s go in here. Oh, remove it’s right here. Okay, let’s remove the API. Okay, now let’s add it. Yeah, it doesn’t see it only pulls up.
Krish (aws.snowpal.com) (26:24.775)
Is it only pulling up?
Krish (aws.snowpal.com) (26:31.326)
You’ll first need to get an API added.
Krish (aws.snowpal.com) (26:37.822)
It’s able to pick up the Hello World API, but someone’s gotta tell me if this is a bug.
Or if I’m doing something not so right here. Because I would have expected, where is this v1 1.0.0 coming from?
Krish (aws.snowpal.com) (27:06.139)
You won.
Krish (aws.snowpal.com) (27:20.77)
Let’s be 2.0.x.
Krish (aws.snowpal.com) (27:37.811)
and data graph.
Krish (aws.snowpal.com) (27:43.694)
I’m trying to think. I mean, we can go through the tutorial, but that’s going to be a digression. It’s going to tell you things that we may already know here.
Krish (aws.snowpal.com) (27:54.402)
Published as December 15th. Yeah, that’s not correct because that’s from when I did the last podcast three days ago. So view and exchange. Published 11 minutes ago, manage versions.
Krish (aws.snowpal.com) (28:12.46)
Yeah.
Krish (aws.snowpal.com) (28:16.686)
This is the version, we added a new version.
Krish (aws.snowpal.com) (28:21.877)
One dot.
Krish (aws.snowpal.com) (28:26.114)
Let me promote it to stable. Maybe that’s what will make the difference here.
Krish (aws.snowpal.com) (28:39.022)
I think so. I think we discussed this the last time as well actually.
Krish (aws.snowpal.com) (28:48.558)
Let’s get out of here.
Krish (aws.snowpal.com) (28:56.702)
View and exchange. Updated 32 seconds ago, that is the latest one available. Manage versions, 2.0.1 stable instances, marking service. Can add more new versions if you wanted to.
Krish (aws.snowpal.com) (29:20.642)
Yeah, I don’t want to do that though. So I’m still trying to understand why this is not able to pick up the latest changes. What did I? Is it something that we did not publish? How long are we into this? Oops.
Krish (aws.snowpal.com) (29:41.063)
Too many windows open here.
Krish (aws.snowpal.com) (29:48.354)
Should I stop recording?
Krish (aws.snowpal.com) (29:58.566)
Oh no, I’m not, I’m still recording. Let me move this window here. Okay. I think we’re like a half hour in. Sorry, we haven’t made much progress today, but it’s all right. I wanna share a few things that I think I have in my mind. I think I have an idea what Datagraph actually is here, but I still want to know as we progress. So this is truly how we would possibly be.
uh, stock and development will figure our way out, find a way out of this essentially.
Krish (aws.snowpal.com) (30:36.722)
What is the one thing that I may not be doing here for it to actually not find it?
Krish (aws.snowpal.com) (30:48.07)
F3
Krish (aws.snowpal.com) (30:52.278)
did it two minutes ago manage versions it’s only got two versions two zero and two zero one I let’s say even delete this previous version so we only have one version left version detail okay and now we go back here add a new API
Krish (aws.snowpal.com) (31:23.414)
Ah, now it picks up. V1.1 and 201. I don’t know, this looks like a bug to me. I had a feeling it might have been a bug, but since I’ve never seen this tool before. Yeah, this looks like a bug. See, because we are at 201 and it shows up here. I don’t know, so it does pick up, right? That’s what I was expecting. Wherever this API is, there’s a new version. It’s published. I don’t know if there’s a lag, but if we did anything differently.
because you know in the real world you don’t want to delete it and re-add this right you want to pick up the new version I don’t know, someone who knows is better should be hopefully be able to tell us let’s go through the defaults
Now it doesn’t let us, now it’s actually asking us for URL. It doesn’t let say get an existing URL from the platform and says invalid, you need to provide a new one. That seems a little bit strange too, doesn’t it? Let’s see.
Ah, so for the previous version, there is a mocking service. Does that mean?
Is it because let’s see manage versions add a new version development 202.
Krish (aws.snowpal.com) (32:57.586)
No, I don’t want to add a file outside of this, so that’s fine. I’m just trying to see if we could just add a new version, but not by uploading that file.
Krish (aws.snowpal.com) (33:12.15)
because for this version it generates the mocking service but what if i wanted it for the latest version
Krish (aws.snowpal.com) (33:26.198)
We did not find an instance for the ZPI version in any point platform. Why? What is the difference?
Krish (aws.snowpal.com) (33:42.075)
Yeah, that is version, the latest 201. Stable, there is a URL. Let’s copy that. Cause when you go pick a first version, if you notice here.
Krish (aws.snowpal.com) (33:59.598)
What does that URL look like? Any point, MuleSoft, mocking.
exchange assets FB, exchange assets FB, and then Hello World API 1.0.0, and this is 2.0.1, right? Slash M, so you know what? Let’s just pick a new one.
Krish (aws.snowpal.com) (34:30.654)
Do you want me to make that same URL?
Krish (aws.snowpal.com) (34:35.31)
And we’re gonna pick not the defaults.
Krish (aws.snowpal.com) (34:42.746)
add to unified schema, proceed to unified schema. Okay, now we added a new version, like you’re making some changes to your endpoints in one of the APIs because you could, based on what we’re seeing here, you can have any number of APIs added. At Snowpal, we have like eight different APIs, for instance, right? So if you go here, we have like eight different APIs. At this point, that list is growing and thousands of endpoints.
So we could add one or two or more of those APIs, expose a select set of endpoints, right? Not all of them, maybe not thousands of endpoints, maybe between multiple APIs, we expose a few endpoints because as a customer, you’re interested in a combination of the APIs, but a select set of endpoints in that combination of APIs, if you will. So let’s say we add the APIs, we could actually do it the next time, maybe now that we know, understand a little bit more
about data graph, you can literally add, let’s say if I go to building blocks, snowpal.com, this has got, this API is one of the APIs got a lot of these endpoints, right? Now, if I go to something called status API, this is another API has different set of endpoints. Now we can add these two APIs, select hand cherry pick the endpoints that we’re interested in, and then add those endpoints into the mix here, right? Into the mix here.
and make it part of this unified schema. And then we have a graph endpoint exposed to single endpoint, which now gives us a way to make sort of federated queries across these APIs, which is pretty cool, right? Because you don’t have to write any code to expose the graph endpoints for these underlying APIs essentially, is what I’m assuming, looking at what we’ve looked at in the last like 30 minutes or so. And I’ve not done much by way of talking here.
because I was just trying to digest it and we did run into a couple of bugs, at least one, maybe more than one on data graph here, and as I read it something differently, the versions did not show up. But that’s what it looks like in unify your APIs and do use them in a federated manner. But let’s try this. Unfortunately, we only one API, we didn’t create a second one, perhaps exposing, taking the open API spec for the couple of snowpal APIs, adding them here would.
Krish (aws.snowpal.com) (37:07.458)
might actually be quite interesting.
Think about it, our APIs are pretty big. They have lots of endpoints. It starts testing systems. A lot of the systems, you know, we work closely with different providers, hubs, and they’ve reported to us that, hey, we are not built sometimes to handle these large, these large number of endpoints. So you’re actually being able to help other companies improve their systems along the way. The reason I mentioned that is,
also to buy time while this is spinning. Let’s see, probably it’ll be done hopefully soon. Maybe we can leave that one open for a second. I just wanna, and we only have, okay, it’s done, right? It’s done. Let’s explore it. I’m curious to just show you the schema, right? So let’s go to overview. Let’s go to explore the schema. So this, right now, these two endpoints are part of the same API, but I’m pretty sure.
This basically gives you a collective set of endpoints that come from these different APIs, because you can add any number of APIs here. I’m pretty sure, pretty reasonably certain about it. OK, now I want to explore the schema. I’m trying to get it.
Krish (aws.snowpal.com) (38:33.57)
That’s not the one I’m looking for.
Krish (aws.snowpal.com) (38:40.138)
Thank you, that was annoying.
Krish (aws.snowpal.com) (38:44.898)
view API documentation. That might be the rest of the documentation right now. That’s not what we’re interested in. API details.
Krish (aws.snowpal.com) (38:56.47)
not this one either no that’s going to the design center let’s go back out I thought I saw something
Krish (aws.snowpal.com) (39:09.518)
So, explore schema.
There’s the graph.
Krish (aws.snowpal.com) (39:19.646)
Level one types, nested types. Why can I not even get in here? OK. Is that a visual representation of what we’re seeing here? I’m going to go to the data types of these so I can actually show you or see for myself what the graph equivalent looks like. Let’s see.
Krish (aws.snowpal.com) (39:46.01)
Overview, you’re back here on the root page, unified schema.
Krish (aws.snowpal.com) (40:00.97)
Oh, is this, I’m actually getting in. It’s just the UI is a little bit confusing. Is that what it is? That’s greeting one. This is greeting. And it tells us the source APIs and it tells us the field types. Maybe this is the UI for exposing. I mean, I’m used to more, I get more traditional graph QL UI, like on Apollo. I’ll probably do a different podcast on that. That’s actually quite interesting. The graph, the topic of graph is actually very interesting to me.
this is probably the any point UI for seeing the graph content. So this is basically saying what the data type is, right? It says this is returning a string and it is required to return that string by which of the bang there. Response logs, if you did make a request, did we not actually make a request? Let’s run an operation.
Krish (aws.snowpal.com) (41:00.53)
Oh yeah, this is, I think I did run an operation to get in here. This is the UI I was kind of looking for, the more typical graph UI. Okay, let’s say new greeting.
Krish (aws.snowpal.com) (41:18.866)
Okay, new greeting.
I thought we had renamed it maybe after we deleted we didn’t rename it yeah
Let’s just do one at a time first. Oh, 403. The authorization in one of the sessions might have expired. Error trying to access the resource. That’s because the URL, I believe we added that manually. That might be causing this issue here. So let’s go back out. There’s a more graceful way of getting out here. Open API list.
Krish (aws.snowpal.com) (42:04.642)
I’m back here. Visible, yeah, we didn’t rename the method, right? So this is the actual name. I forgot that after we deleted, added it back, we did not rename the method API details. Edit URL. So we’re using V1 sources, exchange assets, current auth type, no auth.
Krish (aws.snowpal.com) (42:38.766)
Why is it not actually? So we did manually add the URL.
Krish (aws.snowpal.com) (42:50.774)
mode API schema. No, I don’t. Okay, I guess this is promoting into a higher environment basically, okay.
Krish (aws.snowpal.com) (43:02.802)
um explore schema run operation and so back around lose this window
Krish (aws.snowpal.com) (43:22.51)
So there’s a 403 as an authorization here in valid of the session might have expired and authorized access to this particular resource. I’m quite certain it’s because we added that. Let’s do this. Let’s go back here. Let’s go to APIs added. Let’s go in here, move the API.
Krish (aws.snowpal.com) (43:46.611)
Okay, and see if yeah, again. Yeah, that data is certainly wrong. Published to exchange is certainly not 15.
Krish (aws.snowpal.com) (43:56.614)
okay let’s just pick the previous version
Krish (aws.snowpal.com) (44:06.697)
Nooo what?
So this is basically saying you can establish in a new way to authenticate this unified schema. However, that needs to, however you choose to implement it, right? Now I picked the previous version. I have to understand better how, where that URL actually is coming from, right? The mock URL, because this works here. Even though we create a new version, still have the mocking service for that version. So there should really be no difference
picking the previous version and doing the schema here and picking the newer version. But we know that it worked when we had the older versions only when I used the manual URL. And I manually used this particular URL. It actually did not like it. Just why I went back and deleted it because we know at least we saw that part of the picture. Now let’s, I want to at least run one query and explore the schema for a moment, right?
Krish (aws.snowpal.com) (45:07.53)
And perhaps the next time I can actually add real APIs here, our APIs to see what it, I mean, maybe not the ones where they have hundreds of them, and one where I can trim it down so it has fewer endpoints, like maybe 10, pretty small number. And then we have two APIs with collectively 20 endpoints, and then we can try playing with that here possibly. That’s of interest, let me know. I’m actually happy to do that. Okay, so let’s wait.
For a minute or two, we saw that this actually took a little bit of time, not all that much. And let’s run a query. And I want to presume that these two endpoints were coming from different APIs. But imagine you have two different APIs built by two different teams, probably hosted two different places on two different cloud platforms. It doesn’t matter. DataGraph seems to give you a unified way of accessing those two APIs. The devil, as I always say, is in the detail.
how each of those APIs might have its, not might, will have its own security mechanism, which may or may not be consistent depending on who the providers are. They could be two different companies or two different teams in the company that actually have different security mechanisms. I wanna know how all of those things might need to be wired into from a data graph standpoint. But that gets into the next level of complexity. Here, we’re just trying to understand, okay, 45 minutes ago, I had no idea what data graph was. I actually Googled and I pulled up something else.
And we spent like a minute looking at it. And as it turns out, Salesforce has multiple products that are called Datagraph, as I’m understanding it. One that’s through MuleSoft, which is what we were looking at. And then there’s another one that’s probably part of something else called Data Cloud, perhaps. That maybe there are two different products, right? So we started, it’s done. So we started not even knowing what Datagraph is. I think in the last 20 minutes, we’ve kind of, I wanna say found our way through, right?
This is, I’m pretty certain this is what it is. It gives you a unified view of being able to, of different APIs. And then how you expose this graph endpoint to your client, whether it’s a mobile app, web app, microservice, doesn’t matter. And you actually provide value at. In other words, you could be a middleman here or middle person, right? I’m using that just a regular usage. A middle person, a middle entity that essentially integrates
Krish (aws.snowpal.com) (47:32.81)
disparate systems, different APIs, and exposes a common set of unified schema, I’m just using the language they have there, to your clients. Now those APIs may be built by you in the company. Maybe we should just draw a diagram quickly, but I think it’s, yeah, we have another 10 minutes-ish for an hour. Maybe we can draw something here. But let’s actually run the request before I do that.
or schema or an operation. Let’s run this. Yep, that works. So we just have to figure out what that 403 was when using a different URL.
Right now we’re getting to imagine, right? These are two different endpoints, rest endpoints. Now we collectively able to expose this as a singular request. This is a query. It’s very simple. We’re not having to type any query variables here. And again, I wanna see how mutations work as well. In graph language, if you haven’t used graph before, queries are get requests. Mutations are your patch, put, delete and post request. So let’s do an inspect here. Let’s go to the next.
Let’s see.
Krish (aws.snowpal.com) (48:54.11)
See, so now you see the URL is actually slash graph QL. That’s a typical graph endpoint URL. I mean, you can obviously change it, but it’s a lot of times people just let it be. The request is post. It’s a post request, even though it’s a query, right? Graph accepts it as a post request. And then it has a response back here. We are getting, where you’re getting this response. Now, if you explore the schema, this is what I was trying to get to earlier. I explore the schema. It now tells you that there are two,
endpoints, you know, in graph it’s a singular endpoint, but the schema has two fields, if you will, greeting and greeting one, and then you go into greeting one, it tells you that this actually has, returns a string, and then you can go back here, look at greeting, in our case, they are pretty much the same, but you can imagine this list actually being a pretty long, complicated list. And now when you put this to test with a lot of endpoints, we can see how this works.
So now this is for queries, but you can do the same thing for mutations as well, I’m pretty sure. Meaning you have working integrating multiple APIs. If you’re gonna write to different APIs through this singular GraphQL endpoint, then you would be doing that hosting it on data graph on MuleSoft here. Which I think is pretty neat. If you think about it, if it actually does what it promises, I have no reason to believe otherwise even.
though we ran into a bug or two there. But you know, just a little bit skeptical of systems till I actually have been able to use it, test it, get my feet wet. You know, in a day or two of playing with something, you actually can get a good level of detail, understanding how the dev mechanism works, you know, whether the process, the model, does it work? Is it scalable? Is it scalable from a development standpoint, scalable from a runtime standpoint, and more things of that nature.
Okay, so we saw, you know, again, this is a very super world’s most simple GraphQL query, right? You’re getting responses back from two places. I wanna get the more recent change here with version two, but unfortunately with the URL issue had, we were not able to get that going, okay. And then with Graph, this is standard Graph Editor. You know, you’re probably used to. If you’re familiar with Graph.
Krish (aws.snowpal.com) (51:15.218)
And the schema, it’s fair, straightforward enough to discover it. And you can, you know, this is how graph documentation works. You’re not gonna go to GraphQL 101 here. But what we have done here, we added an API the other day in the podcast. We’ve now exposed that through a unified data graph schema. Graph schema, we’ve had only two end points, the two coming from the same API, but could have had a number of end points coming from different APIs, and the behavior is gonna be quite the same, I reckon.
I guess that seems like the promise of this data graph. I think we can look further in terms of credential security and whatnot, but this gives us a pretty good overview. And that’s idea behind this series of podcasts going through these Salesforce products is to just get our feet wet and hopefully help people who may be considering using some of these things. I think that’s about it. We are close to an hour here.
I could draw a diagram, but I don’t know if I’ll be able to do it in the next six minutes or so. I want to try and keep these podcasts to ideally a half hour, but a higher end, about an hour or so. So I think this was a good exercise. I hope you enjoyed the discovery. The first 20 minutes was very slow, but maybe we did a bit of catching up. And by the end of the hour, if we are not at the end of the hour, the end of 15 minutes, we have a pretty good picture as to what graph.
Datagraph is now the main, a little bit more intuitive now that we know it’s GraphQL unification of schemas. And then we looked at how you could use an existing API, REST API and do it. Now we’ve used one that was created in MuleSoft, but I’m pretty sure it has no bearing on that. You could use any API that’s running anywhere else and then make, just use Datagraph to bring that into the mix here.
Hopefully you enjoyed that. For the end of the video, just make sure you check out our APIs. We have plenty of them. So you’re building mobile apps, web apps, microservices, and you want to spend your time, effort, and energy, and money solving your co-customer problems. The backend boilerplate heavy lifting, you should really leave it to somebody else, and that somebody else could very well be us, because I don’t know who else is providing APIs that are this rich and this broad and this deep, to be honest with you. Just go to aws.snowpal.com.
Krish (aws.snowpal.com) (53:40.914)
or saas.snowpal.com to check it out. That’s about it in podcast number five in the series. We’ll talk soon in the next one. Thank you.
Go to Part 4.
Snowpal’s Products:
- Backends as Services on AWS Marketplace
- Mobile Apps on App Store and Play Store
- Web App
- Education Platform for Learners and Course Creators