 So I've started up a little plugin in our plugin section and I've activated it and currently it's doing nothing. So I'm going to first of all namespace it so that I don't have any conflicts whatsoever. And what I'm going to do now is I'm going to start working on the GraphQL syntax that's needed to get this moving for us to be able to query our custom post types. So we're going to hit the custom post types and we'll see that we have a small code snippet here over how we can be able to create a new custom post type that's going to handle data and for example here we're given one that's talking about docs. So I'm going to copy all of this, come back into our short code here and of course when I save this and come back to our backend and reload it you'll see that we have a new docs and if we were to do a GraphQL query we can actually query for the docs in here by going for documents and then in the documents we shall get the edges then in the edges we shall get the nodes and in each node we can have an ID, we can have a title and we can have the content of each individual document so when we play, when we hit play we actually see no content comes back because we don't have any docs in here so what I'm going to do is I'm just going to quickly add a new doc in here that's our title and I'll give it some lore and then publish this so if I come back and hit query here we'll see that we have our title and we have our content actually showing up in our data endpoint but in this particular case I am not looking for creating a new document in here you'll see that we tap into the hookup in it when WordPress is initialized we then add a function which registers a post that's called docs and we show it in the UI, we give it a label and we call it docs and then we show it in GraphQL it's hierarchical and then we give it a single name for GraphQL we give it a plural name for GraphQL because as we are querying here and we add document, we can query for one document and get its ID for example we are able to do that but we are also able to look for when there are many and just add documents so that's why we need both a plural and a singular name which are thrown in the end so if we wanted to add a custom post type for example we want to get matches, clubs or players we have to just add a filter now this filter is what we call a register post type that is part of the WP GraphQL plugin so what I am going to do is I am just going to come here and overwrite this and in here we are going to look for the post type by coming back here to when we hit matches we will see right here at the bottom that it calls it SP event so that's our post type we also have a post type called SP team we have a post type of SP player we have a post type of SP staff so we have staff, player, team and event so I'll just note those down here so those are the post types we are going to be looking for now in order not to repeat all of this I am going to have to make it a little bit dynamic but for one let's just start with this SP player, save we'll call this player and then I will call these players for plural so I am going to come back here I have a number of players in my post type so that won't give us a headache so what I am going to do here is I am going to look for players and you can see that our self documenting endpoint is already giving us that so we will go for the edges and then look for the nodes and then we start getting the individual idea of the player we get the title right there we can get a featured image and in the featured image we are able to hit when you hit control space byte gives you all the options that are available so we are able to get a URI and when we hit play here we are able to see that we have Spencer Duncan those ideas that we have featured image on them and a lot more information that can come from the players we have content we have content type we have terms we have template we have slug we have slaters a lot more information that is not yet available because by default this post type hasn't been queried to get all the full information so most of these you will see actually meta data that is added onto the post type in order to work out all our other pieces we are going to just add this information here so we'll have an event and then we'll have events here all matches and we're going to do the same for team so we'll get this then we'll get the club then we'll get the clubs and eventually I'm going to duplicate this and we're going to add the staff call this staff and then we'll call this staff persons so if I come back can look for clubs I'm going to get their edges then I'll get their nodes then I'll get their ID then I'll get their title if we come down here we actually have our clubs showing up as we've added them onto our GraphQL endpoint or instead of players let me change this and call them staff persons the capital P you'll see that I have all this coming back and then I also have the clubs showing up on the same endpoint so I can query for only the data that I need at that exact time we can also get the events so we'll reload this here to see the schema if it comes through so we have events here and when we hit play we actually get back our events our title, our content and that's how you add a custom post type to your WP GraphQL endpoint