Dgraph project workflow with a go api

Hello,

New user of dgraph here, testing it by writing a new API with dgraph as a backend DB. I’m also learning graph db at the same time. My challenge is not understanding how to work with dgraph but to integrate it with my workflow as I update my golang project.

Usually DB migrations are used to make sure the db is updated incrementally but in dgraph use case how do we accomplish that? I understand if there are no migration lib but can it be done manually through scripts? curl commands? other? What is your experience in building your data layer in the golang api as well? if I create a graph model or schema how do I execute it against the server?

I’m building an app with a web/mobile front end and an api backend. The app is not fully a social app but an ecom one with a social features like follow likes, etc. Can I store user access / authentication / and authorizations in dgraph? I did not want to go with a SQL solution and lay a graph framework on top, I’m going for simplicity, a db that gives both a storage solution with a highly flexcible model and relationships.

Have you worked with other graph DBs? I looked at memgraph but I believe you still need an underlining storage engine to use it!

Any help is appreciated!

Hi @m1ghz,

You might want to check out dgman: GitHub - dolan-in/dgman: Dgraph schema manager, with mutate and query helpers

This is a golang-based package that allows schema management from Go structs.

Regarding user auth, yes Dgraph supports ACL… see Access Control Lists - Dgraph

thank you @matthewmcneely

I added the library unfortunately the code is not recognizing the types provided by the library like GeoLoc although all references are added to the project. I’m having so many issues using just the basic setup to get started!

At this point, i’m thinking of just doing the schema and setup on the graph db manually to move forward. I don’t see anything online related to this error “Unresolved type ‘GeoLoc’”. I’m having less and less confidence now that dgraph would not cause any issues in the future.

Without a compilation error trace it’s hard to know exactly what the issue is, altho if importing dgman, the reference would be dgman.GeoLoc

The unit and integration tests for dgman are passing so pretty sure it’s on your end. But happy to review your error trace if you want.

I got it resolved, a silly mistake from my part. Thank you for helping. the dbman lib is cool.

Given that the cloud option of dgraph is being phased out. What is the future roadmap of this graph DB? will it still get supported or new features/fixes added in the future?