Get CMS Pages collection using Graphql Magento 2.

Get All CMS pages using GraphQl in Magento 2 by a simple module.

We can get all the CMS Pages collection by GraphQl by just create the Resolver model and add our custom logic for getting all the CMS Pages collection. You can add a filter to the condition for getting specific CMS Pages in the Resolver PHP file.

If you want to know Out of the Box Magento cmsPage Query, Refer a link with more explanation, Cms Page, and Cms Blocks GraphQL Query in Magento. 

I hope you are aware of What is GraphQl and how GraphQL is used for the programming language like Magento 2 If You are new to GraphQL check the link for GraphQl in Magento.

Continue reading “Get CMS Pages collection using Graphql Magento 2.”

Get Cms Blocks collection using Graphql Magento 2.

Get All CMS static block using GraphQl in Magento 2 by a simple module.

We can get all the CMS Static block collection by GraphQl by just create a Resolver file and add our custom logic for getting all the CMS Static block collection.

If you want to know Out of the Box Magento cmsBlocks Query, Refer a link with more explanation, Cms Page, and Cms Blocks GraphQL Query in Magento. 

You can add the filter to the condition for getting specific CMS Static block also in the Resolver PHP file.

I hope you are aware of What is GraphQl and how GraphQL is used for the programming language like Magento 2 If You are new to GraphQL check the link for GraphQl in Magento 2. Continue reading “Get Cms Blocks collection using Graphql Magento 2.”

How to Run Javascript after KnockoutJS has rendered all elements in a page magento 2?

Magento uses knockout js at many places in the code. You can see Checkout page data render using knockout js in Magento 2. To custom requirement, You need to execute some javascript code after knockout js load completely.

If you are using require([“jquery”, “domReady!”], function($){} function or jQuery(window).load() function, Using this way mostly your custom javascript code execute before the knockout element render.
Continue reading “How to Run Javascript after KnockoutJS has rendered all elements in a page magento 2?”