Using GraphQL, Strapi v4.0.7, strapi-plugin-comments 2.0.3.
When upgrading to version 2.0.3 from 2.0.0, previous GraphQL queries seem to fail due to custom mutations and queries (such as findAllInHierarchy, createComment) not being available with the default settings. Modifications carried out through the newly added Settings page have no effect on this.
Steps to reproduce
Add a Content-Type of api::post.post (Post), having a Rich Text field named content and a text field named title. Add a post for testing purposes.
Update the version of strapi-plugin-comments to 2.0.3 by editing package.json, then issuing yarn install.
Rebuild and start Strapi using yarn build, then yarn develop.
Repeat the mutation specified above. It fails with GRAPHQL_VALIDATION_FAILED: Unknown type "Id". Did you mean "ID"? Correcting this mistake yields the underlying error GRAPHQL_VALIDATION_FAILED: Unknown type "CreateCommentAuthor"., which in turn makes it obvious that the GraphQL functionality of the comments plugin is not enabled, or incorrectly configured.
Set the appropriate settings using the new interface and click Save.
Repeat the mutation. It still fails with the same errors.
Restarting the server results in a different error message:
INTERNAL_SERVER_ERROR: TypeError: this.getCommonService(...).getConfig(...).includes is not a function
at resolve (.../strapi/node_modules/strapi-plugin-comments/server/graphql/mutations/createComment.js:21:11)
Removing comments: { } (essentially leaving an empty function) leads to the GRAPHQL_VALIDATION_FAILED specified above. So does reverting to the default configuration through the Admin interface.
Expected behavior
Upon updating to the new version, for lack of manual configuration through the Admin interface, the fallback configuration of plugins.js should be used, and the GraphQL integration should still work. It should be clearly indicated somewhere whether the active configuration is the one specified through the Admin interface, the fallback configuration in plugins.js, or a mixture of both.
Using GraphQL, Strapi v4.0.7, strapi-plugin-comments 2.0.3. When upgrading to version 2.0.3 from 2.0.0, previous GraphQL queries seem to fail due to custom mutations and queries (such as findAllInHierarchy, createComment) not being available with the default settings. Modifications carried out through the newly added Settings page have no effect on this.
Steps to reproduce
api::post.post
(Post), having a Rich Text field namedcontent
and a text field namedtitle
. Add a post for testing purposes.with the parameters
As expected, the query succeeds.
package.json
, then issuingyarn install
.yarn build
, thenyarn develop
.GRAPHQL_VALIDATION_FAILED: Unknown type "Id". Did you mean "ID"?
Correcting this mistake yields the underlying errorGRAPHQL_VALIDATION_FAILED: Unknown type "CreateCommentAuthor".
, which in turn makes it obvious that the GraphQL functionality of the comments plugin is not enabled, or incorrectly configured.has no effect whatsoever.
comments: { }
(essentially leaving an empty function) leads to theGRAPHQL_VALIDATION_FAILED
specified above. So does reverting to the default configuration through the Admin interface.Expected behavior
Upon updating to the new version, for lack of manual configuration through the Admin interface, the fallback configuration of plugins.js should be used, and the GraphQL integration should still work. It should be clearly indicated somewhere whether the active configuration is the one specified through the Admin interface, the fallback configuration in plugins.js, or a mixture of both.