prisma / prisma-content-feedback

Feedback for documentation, articles, tutorials, examples, ...
https://www.prisma.io/docs/
6 stars 2 forks source link

Exported dump does not looks as NDF (Prisma 1.28, Export API) #112

Closed ujja closed 5 years ago

ujja commented 5 years ago

Hi,

I have exported my prisma DB using export API, but I'am not able to import it using import API.:

{  
   "errors":[  
      {  
       "message":"JsResultException(errors:List((/valueType,List(JsonValidationError(List(error.path.missing),WrappedArray()))), (/values,List(JsonValidationError(List(error.path.missing),WrappedArray())))))",
         "requestId":"local:cjyifij7l000z0790dg5yt6lt"
      }
   ]
}

I suppose the exported data is not an NDF:

{
  "out": {
    "jsonElements": [
      {
        "_typeName": "Tag",
        "id": "cjxonc1jl00d507906zc49ep5",
        "createdAt": "2019-07-04T12:28:36.177Z",
        "updatedAt": "2019-07-04T12:28:36.177Z",
        "name": "Demo"
      }
    ],
    "size": 135577
  },
  "cursor": {
    "table": -1,
    "row": -1,
    "field": -1,
    "array": -1
  },
  "isFull": false
}

doc of 1.28 says:

The structure for a JSON document in NDF is an object with the following two keys:

valueType: Indicates the value type of the data in the document (this can be either "nodes", "lists" or "relations") values: Contains the actual data (adhering to the value type) as an array

Do I have to convert it to NDF?

ujja commented 5 years ago

moved to prisma. sy.