 Welcome back to the channel So today we are going to be looking at adding custom fields and meta And we are going to do that using a WP GraphQL So what I am going to do is just get this code snippet And then I will explain what is going on So we will just drop this here after our namespace And let's see So it is using the hook GraphQL register post types And we are going to be adding an unnamed function here That is tapping the register GraphQL field So in comparison to all the other pieces We are just adding a filter and correcting information Here we are going to be using an add action So in our post type First of all we need to add a post type Then we are going to add an ID of the field That we are actually going to use Which is the color We add a type of data that it is Which is a string We add the description Of course the color of the post And then we resolve it We add a resolver Which is just basically another function saying Let's get the post meta And we pass in the ID And then that will be the color Of course that has to be true And then if it is not empty Then we return Or is every other post is going to be blue So when we come back to our queries We are actually able to query for this So I will go for the posts And then inside each post I will go for the nodes And then I will just get the ID And then if you look at this Now we actually have our color popping up In our options So if I press play You will actually see that We get back our data And on each post we have a color which is blue So the job would be on us to create a meta box That our user can actually create on the front end And actually get this color And then make it into something else That is not blue Inside our particular match day events We have a field here That I would like to get Which is basically the match day So I would like to get the match day What I am going to do is I am going to inspect it And then I am going to get its name Which is SP Day That is usually the ID For the meta box We get it from the name So I am going to just come back To our post here And I am going to get this And call it SP Day Which would be a really good name For our query And I am going to call it a match Match Day It's already SP Day On our content type And this is going to be on the event This particular meta field Of meta data field Is actually going on only one post Of that particular post type That's why we use the singular name here So it's going on the event I will save this And then I am going to come back here Reload this And I am going to go into the events Quickly I will see we no longer have this color It's not effective Because it's not available in our code But if I look for match day We actually find that match day is available And when I Call for that data We'll see that we have one One here, blue, blue Because our shaks Egos game As we can see here Is actually under match day One, so let me change this to two And update this If we Refresh this data You can see that our shaks Egos game is on day two It's already available for us to use So that's how you actually Add an extra field of meta data Into your WP GraphQL And it will affect it