magefan / module-blog-graph-ql

Magento 2 Blog GraphQL extension. Provides GraphQL endpoints for Magefan Blog Module
31 stars 7 forks source link

Query blogPosts filter Internal server error #6

Closed BiancaYen closed 4 years ago

BiancaYen commented 4 years ago

I'm currently looking into finding a Magento 2 Blog module with supports GraphQl and I'm trying out yours.

Versions:

"magefan/module-blog": "^2.9.1",
"magefan/module-blog-graph-ql":  "^2.0.1",
"magento/product-community-edition": "2.3.4"

When running the following query:

{
  blogPosts(currentPage: 1, pageSize: 1, filter: {search: {like: "world"}}) {
    total_count
    items {
      title
      short_filtered_content
      author {
        author_id
        name
        author_url
      }
      post_url
      creation_time
      tags {
        tag_id
        title
        tag_url
      }
      categories {
        category_id
        title
        category_url
      }
    }
    total_pages
  }
}

I get the following error:

Attribute not found in the visible attributes list at app/vendor/webonyx/graphql-php/src/Error/Error.php:174, LogicException(code: 0) Attribute not found in the visible attributes list at /app/vendor/magento/frameworkGraphQl/Query/Resolver/Argument/AstConverter.php:88

When I remove the filter attribute on the query it works.

Alternatively where can I find the documentation for the REST api?

Edited: Sorry, I see this is open: https://github.com/magefan/module-blog-graph-ql/pulls When will it be merged?

Thanks! Bianca

ihorvansach commented 4 years ago

Thank you for your report. Can you please try to use this fix https://github.com/magefan/module-blog-graph-ql/commit/fbe0cc8e50a85cee69b4ce4b1a07ffa4e0982878

Let me know if it works well for you. Can you also tell me what is your Magento 2 version?