Problems getting up & running

Relatively new to graph DBs, but have been using databases for a long time. We have a successful product running on SQL server using their graph extensions, but are assessing options for a more focused, portable graph-based back-end.

I managed to have completely broken my Dgraph install in about 30 minutes which is not encouraging. In particular the Ratan UI (both latest & dev) is throwing this error:

TypeError: Cannot read property 'find' of undefined
    at a.value (Schema.js:343)
    at Ha (react-dom.production.min.js:4333)
    at Pa (react-dom.production.min.js:4324)
    at vs (react-dom.production.min.js:6700)
    at lc (react-dom.production.min.js:6150)
    at sc (react-dom.production.min.js:6139)
    at Js (react-dom.production.min.js:5880)
    at react-dom.production.min.js:2851
    at t.unstable_runWithPriority (scheduler.production.min.js:309)
    at Bi (react-dom.production.min.js:2816)

I think I must have submitted a bad Type (I’m trying to wrap my head around building a schema and have had no luck). I ran this command to try to reset the database with no luck:

curl -X POST localhost:8080/admin/schema --data-binary @schema.dql
{"errors":[{"message":"resolving updateGQLSchema failed because Can't store predicate `dgraph.graphql.schema` as it is prefixed with `dgraph.` which is reserved as the namespace for dgraph's internal types/predicates. (Locations: [{Line: 3, Column: 4}])","extensions":{"code":"Error"}}]}

Really just trying to get to the point where I can define a schema and get a feel for the query language. I’m quite concerned that this product is currently quite fragile, it is worrisome to me that it may break down in the face of a poorly-defined schema (if that’s what the cause actually was).

1 Like

I’d recommend starting off with the cloud, so you’re not fighting how to run and set up Dgraph itself. That way, you can get a feel for the DB, and decide later how you want to set it up.

It’s running, but broken. Running a local instance is a key requirement, so I’m also interested in learning how to do that.

1 Like

you can also do a “drop all” and start fresh.

Apologies - I should have posted this (which I believe is how to “drop all”):

curl -X POST localhost:8080/alter -d '{"drop_all":true}'
{"errors":[{"message":"MANIFEST removes non-existing table 5","extensions":{"code":"Error"}}]}
1 Like

Looks like your storage is broken.

I gathered that :laughing:

I was playing around with trying to add types. Most of the time it failed (me just working out the syntax). I submitted a completely empty type at one point which seemed to be when the trouble started. Could that cause the storage to break?

What is a “completely empty type”?

type Empty {}

?

Are you trying to focus on using GraphQL or DQL?

Here is what I learned from your same position.