Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation and help with i18n #42

Open
4 of 7 tasks
goravbhootra opened this issue Nov 5, 2019 · 1 comment
Open
4 of 7 tasks

Documentation and help with i18n #42

goravbhootra opened this issue Nov 5, 2019 · 1 comment

Comments

@goravbhootra
Copy link

goravbhootra commented Nov 5, 2019

Hi @liveforeverx,

Thank you for the fantastic library and amazing implementation of Dlex.Node. I am working on developing a LMS prototype - my first attempt at using a Graph database. I had to dig into Dlex code to understand the implementation. I intend to add documentation and may be a sample repo for anybody else wanting to use the library. I have done the following:

  • Implemented a Grepo module similar to Repo.ex for making calls to Dgraph. I may be using postgres in the project as well and hence, retained Repo for the purpose.
  • added Grepo to supervision tree.
  • implemented a the model (Course.ex) using Dlex.Node and the context (Courses.ex).
  • got CRUD action to work with a html view.
  • i18n feature in model - this is where I need help at the moment.
  • define associations in the models - needs update in Dlex for supporting [:uid] added in Dgraph v 1.1
  • define unique constraints on fields.
defmodule Lms.Courses.Course do
  use Dlex.Node
  @derive {Phoenix.Param, key: :uid}

  import Ecto.Changeset

  schema "courses" do
    field(:title, :string, index: ["term"])
    field(:description, :string)
    field(:duration_allowed, :integer)
   ...

how do I use title@en or other locales in this context?

any pointers to the pending items would be great help.

Best,
Gorav

@goravbhootra goravbhootra changed the title Documentation and sample repo Documentation and help with i18n Nov 5, 2019
@goravbhootra
Copy link
Author

goravbhootra commented Nov 14, 2019

added documentation for usage with phoenix app - #55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant