I'm looking at graphql. Is it possible to define an object with arbitrary attributes? Let's say I have some data like:
editOptions : { boxes : 3 , size : { width: 23,height:32} , color: #434343 }, etc...}
and this is in:
{ ... , box : { editOptions : {...} }, ... }
Let's say that editOptions is never with the same structure, sometimes not be useful to have the color, just for example sakes. In mongoose one can just define the type to something like:
editOptions : {}
These editOptions are usually unique for each box. With some attributes being shared but most being unique.
So my question is, is there a way to do this? or is this bad practice and I should change my models.
Thank you.
"message": "Argument \"data\" has invalid value {a: \"A\", b: \"B\"}.\nExpected type \"ObjectType\", found {a: \"A\", b: \"B\"}."
. Any ideas where is the problem? – Vaporescence