Im trying to get and alter the schema on a class but I just get errors.
if I do this, I get
const mySchema = new Parse.Schema('bookings')
await mySchema.get({ useMasterKey: true })
console.log(mySchema)
ParseSchema { className: 'bookings', _fields: {}, _indexes: {} }
An empty schema
if I do this
const mySchema = await new Parse.Schema('bookings').get({
useMasterKey: true,
})
I get the schema back, but any operation I try gives an error, like
mySchema.deleteField('acc')
TypeError: mySchema.deleteField is not a function
I assume it something simple im doing wrong?
or is it an issue with the server/client im using? this is all in node environment.
“parse”: “4.1.0”,
“parse-server”: “5”,