Setting access controls on a definition

Hi devs

i am having problem in

Setting access controls on a meta definition please find request and response below

/****************request *************/

===============query =============

mutation CreateMetafieldDefinition($definition: MetafieldDefinitionInput!) {
metafieldDefinitionCreate(definition: $definition) {
createdDefinition {
id
name
namespace
key
access {
admin
storefront
}

add other return fields

}
userErrors {
field
message
code
}
}
}
===========variables============
{
“definition”: {
“name”: “new feature”,
“namespace”: “new_feature”,
“key”: “enabled”,
“type”: “number_integer”,
“ownerType”: “PAGE”,
“access”: {
“admin”: “MERCHANT_READ”,
“storefront”: “PUBLIC_READ”
}
}
}

/=============================response=================/

{
“data”: {
“metafieldDefinitionCreate”: {
“createdDefinition”: null,
“userErrors”: [
{
“field”: [
“definition”
],
“message”: “Setting access controls on a definition under this namespace is not permitted.”,
“code”: “INVALID”
}
]
}
},
“extensions”: {
“cost”: {
“requestedQueryCost”: 11,
“actualQueryCost”: 10,
“throttleStatus”: {
“maximumAvailable”: 2000,
“currentlyAvailable”: 1990,
“restoreRate”: 100
}
}
}
}

Were you able to solve this? Having the same issue

Namespace should be $app:preferences

Usage: “namespace”: “$app:preferences”

If you want to make all applications, merchants have read and write access then the admin access should be “admin”: “PUBLIC_READ_WRITE”.

If you want to use a custom namespace then you have to remove the “access” input.