[details=“System Information”]
Strapi 4.12.0
Windows 11
mysql
v18
npm v10.1.0
yarn 1.22.9
I created a plugin called emailtemplate and added a content type.
in the content-types subfolder of the plygin I have the schema:
{
“kind”: “collectionType”,
“collectionName”: “emailtemplates”,
“info”: {
“singularName”: “emailtemplate”,
“pluralName”: “emailtemplates”,
“displayName”: “emailtemplate”,
“description”: “”
},
“options”: {
“draftAndPublish”: true
},
“attributes”: {
“templatename”: {
“type”: “string”
},
“template”: {
“type”: “text”,
“required”: true
}
}
}
I am trying to use graphql to access the data entered in this content type, via the command
query
{
emailtemplateEmailtemplates
{
data
{
attributes
{
templatename
template
}
}
}
}
I keep getting the error:
{
“errors”: [
{
“message”: “Forbidden access”,
“extensions”: {
“error”: {
“name”: “ForbiddenError”,
“message”: “Forbidden access”,
“details”: {}
},
“code”: “FORBIDDEN”
}
}
],
“data”: {
“emailtemplateEmailtemplates”: null
}
}
Can someone help?