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
}
}
}
}