I am able to login with clientID and client Secret to our test project using cdf cli. Also the “cdf dm create” is working. However, when publishing a graphql using “cdf dm publish” there was always a validation error even using the demo GraphQL data model. Below is the error message:
$ cdf dm publish --file=./test.graphql --external-id="testgraphql1" --space="testgraphql1" --version 1 --verbose
2023-02-28T13:24:31.576Z cdf:middleware:auth Fetching auth token from CDF...
2023-02-28T13:24:31.577Z cdf Getting token via Client Secret
2023-02-28T13:24:31.578Z cdf:auth:client-secret Starting to aquire client credential token
2023-02-28T13:24:32.032Z cdf:middleware:auth Finished fetching auth token from CDF
2023-02-28T13:24:32.038Z cdf:data-models:publish dataModelVersionsHandler initialized
2023-02-28T13:24:32.038Z cdf:data-models:publish Reading graphql file ./test.graphql
2023-02-28T13:24:32.039Z cdf:data-models:publish Schema contents 'type Actor {\r\n' + ' name: String!\r\n' + ' age: Int\r\n' + '}\r\n' + '\r\n' + 'type Movie {\r\n' + ' name: String!\r\n' + ' description: String\r\n' + ' watchedIt: Boolean\r\n' + ' imdbRating: Float\r\n' + ' releasedYear: Int\r\n' + ' gross: Int\r\n' + ' runTime: Int\r\n' + ' actors: [Actor]\r\n' + '}'
2023-02-28T13:24:32.331Z cdf:data-models:publish Publish request result {
"isSuccess": false,
"isFailure": true,
"error": {
"message": "Your Data Model GraphQL schema contains errors.",
"type": "VALIDATION",
"code": 400,
"errors": [
{
"message": "e.replaceAll is not a function",
"status": 400,
"errorMessage": "e.replaceAll is not a function"
}
]
}
}
e.replaceAll is not a function
Your Data Model GraphQL schema contains errors.
Could you take a look what could be the root cause?