Hey all, I’m trying to import JSON data to graphco...
# orm-help
t
Hey all, I’m trying to import JSON data to graphcool with the CLI and having some trouble. It’s saying
graphcool import
is not a command, could someone help point me in the right direction?
n
what's your version?
t
Hey Nilan, I messaged you through the graphcool console, but it’s probably better for me to move the convo here. I am using version
0.10.1
n
t
Well that explains it, thanks!
👌 1
Should running
npm update -g
take care of it?
it looks like it’s not getting a few global packages 😕
n
npm install -g graphcool
t
ah that did it, thanks again.
🎉 1
n
you're welcome! 🙂
t
I’ve got an array of mountains that I’m trying to import, and 1 field of each mountain contains JSON. Do i need to stringify & escape this before running the import?
here is one of the mountains
Copy code
{
      "rank": 1,
      "name": "Mount Elbert",
      "range": "Sawatch Range",
      "elevation": 14440,
      "prominence": 9093,
      "location": {
        "lat": 39.1178,
        "lon": -106.4454
      }
    },
location
is the field in question