Solved

Schema validation inconsistencies when publishing data model through UI

  • 22 March 2023
  • 3 replies
  • 83 views

The change in the requiredness of one of the field is not consistently validated across all the inherited types.

Below works and the data model is published.

Data Model Version - 1

interface Person @view(version: "1"){

name: String

}​​​​​​​

type Actor implements Person @view(version: "1") {​​​​​​​​​​​​

 name: String

 didWinOscar: Boolean

}​​​​​​​​​​​​

Next step

Below doesn't work and I get an error "Can not change the nullability of the property\n We do not support modifying a field's 'required'ness at the moment."

interface Person @view(version: "2"){​​​​​​​​​​​​​​​​

name: String!

}​​​​​​​​​​​​​​​​

type Actor implements Person @view(version: "2") {​​​​​​​​​​​​​​

 name: String!

 didWinOscar: Boolean

}​​​​​​​​​​​​​​

Next step

Below works

interface Person @view(version: "2"){​​​​​​​​​​​​​​​​

name: String

}​​​​​​​​​​​​​​​​

type Actor implements Person @view(version: "2") {​​​​​​​​​​​​​​

 name: String!

 didWinOscar: Boolean

}​​​​​​​​​​​​​​

icon

Best answer by Dilini Fernando 26 April 2023, 08:32

View original

3 replies

Hi,

Thank you for the report! This is indeed a bug, however this should not affect the underlying container, so the ‘name’ in this case will still be nullable.


 

Userlevel 6
Badge

Hi @Shreyas Mehta checking if the above is resolved or if you could need more help from us on the matter? 

Userlevel 4
Badge +2

Hi @Shreyas Mehta,

I hope above issue is solved. As of now, I will solve this thread. Please feel free to create a new post if you still experience problems.

Best regards,
Dilini

Reply