GraphQL setAppStoredCustomEntity not working

Hi,

I’m trying to set custom entities in my remote backend with the system token provided.
Accessing the Storage API with a GraphQL client is working fine, but trying to write always leads to a 500 internal server error returned by the GraphQL API

This is my mutation:

mutation forge_app_setApplicationStorageCustomEntity($input: SetAppStoredCustomEntityMutationInput!) {
  appStorageCustomEntity {
		setAppStoredCustomEntity(input: $input) {
      success
      errors {
        message
        extensions {
          errorType
          statusCode
        }
      }
    }
  }
}

And input:

{
  "input": {
    "contextAri": "<my ari>",
    "key": "key1",
    "entityName": "test",
    "value": "{\"name\":\"first entity\"}" 
  }
}

Can someone help me? :slight_smile:

Best regards,
Maxi

Here is the returned error:

{
  "data": {
    "appStorageCustomEntity": {
      "setAppStoredCustomEntity": {
        "success": false,
        "errors": [
          {
            "message": "An unexpected error occurred",
            "extensions": {
              "errorType": "INTERNAL_SERVER_ERROR",
              "statusCode": 500
            }
          }
        ]
      }
    }
  },
  "extensions": {
    "gateway": {
      "request_id": "e47f03e4b8ee4c9897b12bc06d30dd9f",
      "crossRegion": false,
      "edgeCrossRegion": false
    }
  }
}

Apparently, the GraphQL API updated and shows good error messages now :slight_smile:

For the solution, I did not pass the JSON value correctly:

"value": {"name":"first entity"}

It has to be a real JSON value, not escaped as string as I did it :man_facepalming:
The GraphQL explorer even showed an error back then when trying like that :confused: