How do I create seed data when the type of the field is Obj?

#1

I got this error

Expecting specific type for fields with 'any', 'anyof' or 'Obj' type at JSON document

and have written a single .json file for a UserPreference as

{
  "id": "demo",
  "path": "favorite_pages",
  "value": {
    "value": "MyApp.MyPage"
  }
}
0 Likes

#2

From @DavidT via Slack

add type field right after { e.g.:

{
 "id": "demo",
 "path": "favorite_pages",
 "value": {
   "type": "string",
   "value": "MyApp.MyPage"
 }
}
0 Likes