Continuing at 3rd part we will discuss about giving more power to the GraphQl API by simplifying and managing the logic into separate models. We will perform a full CRUD operation and implement them at every step.
It is recommended to watch last 2 parts about GraphQl rest API. Here is the link to the videos:
👉 Part 1 - Create a simple graphql query - how to query magento graphql • Create a Custom GraphQl - Part 1: Create ...
👉 Part 2 - Create and use mutation: • Create a Custom GraphQl - Part 2: Create a...
Chapters:
0:00 Advanced GraphQl API
0:15 Create and implement PostInterface Data interface class
03:19 Create and implement PostRepository interface class
05:52 Create di.xml and add preferences to it
06:21 Modify PostById resolver model and create PostRepository instance
07:46 Test PostById query implementation
08:34 Create ExtractPostData model
10:11 Modify the PostById resolver response logic
11:48 Create GetPost model to simplify data loading using respository
13:11 Replace the PostRepository with GetPost model logic
19:56 Test the posts query implementation
20:41 Modify Posts query and add page limit & size input parameters
21:37 Test Posts query implementation with input parameters
22:31 Modify the Posts query return type and add PostMetaData type schema
23:42 Modify the Post resolver response data
26:44 Rename getPostById query to post
27:01 Test post query implementation
27:33 Mutations
27:38 Modify the createPost resolver class
28:32 Create save method in PostRepository
29:58 Create PostRepository instance inside CreatePost model
32:34 Implement the mutation
33:40 Add deletePost mutaiton schema
35:41 Create and implement delete method in PostRepository
36:51 Create deletePost model
38:56 Implement deletePost mutation
Subscribe to stay tuned: / @knowthemage