Graphcool / graphcool-framework

Apache License 2.0
1.78k stars 130 forks source link

import issues #467

Closed miyi closed 6 years ago

miyi commented 6 years ago

I'm having the same issue on graphcool-framework as I do on prisma. After manually inserting some data into the playground and exporting that data, unzipping the file, rezipping it untouched, and import the rezipped file breaks the import. However importing the original exported zipped file works

my data model is very simple:

type User @model { id: ID! @isUnique name: String! age: Int }

I created 3 nodes of User type

{"valueType":"nodes","values":
    [
        {"name":"Mark","updatedAt":"2018-01-30T01:38:34.000Z","_typeName":"User","age":26,"id":"cjd0z55956vxk0111p9hbz1op","createdAt":"2018-01-30T01:38:34.000Z"},
        {"name":"Moses","updatedAt":"2018-01-30T01:38:57.000Z","_typeName":"User","age":22,"id":"cjd0z5mm96rbx0138ssm4sob6","createdAt":"2018-01-30T01:38:57.000Z"},
        {"name":"Mike","updatedAt":"2018-01-30T01:39:03.000Z","_typeName":"User","age":21,"id":"cjd0z5rey6rcm01388vbfa9jw","createdAt":"2018-01-30T01:39:03.000Z"}
    ]
}

i deleted the manually inserted users prior to importing, command line show no error. nothing is imported to graphcool. Maybe i'm doing something obviously wrong.

Unzipping... 36ms Validating data... 9ms Uploading nodes... Uploading nodes done 1ms Uploading lists Uploading lists done 0ms Uploading relations Uploading relations done 0ms

using gc version graphcool-framework@0.11.5

miyi commented 6 years ago

solution found! Don't recompress the file. import the fold directly with nodes, lists, and relations subfolders. it works great. The issue might be the apple default compression