We're just structuring out the post from the result of the request from the query with that variable being passed in. And we're just getting the post returned as the body of that HTTP method. So, every time someone posts into the chat, for some reason it scrolls right to the top of the chat and I've got to scroll back down to the bottom again. So, Mark, you're getting a 404. It's just waiting for your own message. So, can you just do, can you just do, yeah, like I've done here, just add. So, can, let's go back to the actual files. Can I read properly cover image of null? Well, rather than me trying to debug that now. So, from your index plugin, you can pick out a route here and it will display the information. If you can do that, then just try takcon.json to the end, and that should work. So, if that doesn't work, then I can't see how this should be working because it's getting the information from the end point. So, if you just give us a bit more information, I could try and help you debug it. Doesn't work without.json. So, it's not working at all. So, let's take a look at your slug.json file. I just, I just post it into the chat. That should see, I think, if you put that into your slug.json.js file. I'm just gonna go back to my slug.svelt file here. And I'm just gonna dump out the contents of this post file. And debug that issue for the cover image. So the cover image is here, okay? And it should have a URL. So post.coverimage.URL, don't know what you're complaining about. Okay, seems fine now. Oh, good! Okay, so just pause here a sec for Markin, make sure he's all right. And once we've done that, we'll just cover deployment real quick, and I think we'll wrap up. So I'm going to use Vercel, and a really good way to get started with Vercel, if you don't have it installed already, oops, what have I done there? Cause you can install it as a, like, a global NPM package, but if you don't have it installed, you can just use, I think it's npx-vercel. And that will set up the CLI for you straight away. But let's just wait for mark-in, make sure it's all right. Still errors, so if it's not the, if it's not the end point mark-in, I'm guessing it's how you call it out to it? So what I'll do is I'll just deploy this and I will push this code up to GitHub and let's do it now actually, just so I can share in the chat and everyone's got a link to it. So let's deploy it first, so I'm going to use npx-yself. This is going to ask me a setup and deploy, GraphQL Galaxy Workshop, I'm just going to say yes. I'm going to post it onto my account. I'm not going to link it to an existing project, I'm going to give it that name and it's in the roots. It's going to say no, the default here. So this is going to go off and build to Vercel, but this isn't going to do much on Vercel because the environment variable is not on there. So if I go to vercel.com and this project should show up here GraphQL Galaxy Workshop, then go into deployments and I click on this. And I click on this. It shouldn't take long to build. I need to wait for this to be installed. Or if I'm doing it from home. So while we have this large pause, waiting for this to build, I could go off and publish this to GitHub. It looks like it's done its thing and I am partly confused as to why it's showing the content on here. Cause I haven't defined the end point. How does it know where this is coming from? I haven't defined the end point. How does it know where this is coming from? Network, and xhr. Yes. So let's just fetch from here. Oh wait, the endpoint's there. How is the endpoint there? So if we go back to my code, I'm pretty sure the endpoint isn't detailed anywhere apart from in the.env file. Ah, it's pushed the.env file up as well. But that should be ignored in Git, right? Well, that's kind of a right. So what I'm going to do is um, like a project for this on GitHub. And say new repository, and I'm going to give it the name of project, which is GraphQL Galaxy Workshop 2021, copy that, and paste it in there. and say create repository, and just copy this, into the terminal here, Let's kill that, Okay, so, I'm gonna need to get in it, Now can add that remote, give it branch main, not master, There we go. Rift name Riftshead, Maine, not found. Huh, I guess I'm going to need to commit some stuff to it as well. So let's go over to my completion of commits here and say new features now, we're gonna say introduce new features, I say init. All right, let's try that again. Okay, and push this. So can we go to GitHub, I can refresh this page and there's no.env file, which is fantastic. So now if I go back on over to Vercel here and go over to the project and say connect to Git repository, and it's GitHub and this is the GraphQL Galaxy Workshop, and say connect. So any pushes now to that repository should be built automatically with Vercel here. So we've already got this first one in. Now I'm curious as to if I make a change now, say it's going over to the ReadMe, I'd just change this to, there we go. So if I say update ReadMe, and try that. So if we go back over to Versel now, should be deployed on push, oh, I need to push those myself. So that's pushing up to Versel now. So if I check this, I should have it built in, here we go. So now I'm going to say this doesn't build because the API endpoint isn't here. So we can quickly go over to configure in the environment variables.
Comments