Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Show only active CMS Blocks #176

@artKozynets

Description

@artKozynets

Preconditions

  1. Magento 2.3-develop + sample data (sample data not necessary)
  2. Php 7.1
  3. MariaDB 10.1.17

Steps to reproduce

  1. Checkout to branch 31-cms-page-graphql-support
    Pull request #31 CMS page/block coverage #105
  2. Disable some CMS block: MagentoAdmin > Content > Blocks > choose_your_block ->
    Enable Block: NO -> Save
  3. Run this GraphQL query:
{
  cmsBlocks (identifiers: ["disabled_cms_block", "enabled_cms_block"]){
    items{
      title
      identifier
      content
    }
  }
}

disabled_cms_block: identifier of the disabled cms_block
enabled_cms_block: identifier of the enabled cms_block

Expected result

  1. Get only cms_blocks with status: enabled.
{
  "data": {
    "cmsBlocks": {
      "items": [
        {
          "title": "Home banner 1"
        }
      ]
    }
  }
}

Actual result

{
  "errors": [
    {
      "message": "No such entity.",
      "category": "graphql-no-such-entity",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "cmsBlocks"
      ]
    }
  ],
  "data": {
    "cmsBlocks": null
  }
}

Visualization

error

Settings

settings

Test

With GraphQL query for one cms_block it works in a right way!

awesome

awesome2

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions