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

Contexts #33

Open
mvcds opened this issue Apr 14, 2018 · 0 comments
Open

Contexts #33

mvcds opened this issue Apr 14, 2018 · 0 comments
Labels
available Assign yourself to it! Hacktoberfest help wanted It's too dangerous to go alone roadmap At the moment, contributors think it will be eventually done

Comments

@mvcds
Copy link
Owner

mvcds commented Apr 14, 2018

A hubi context means that tokens and attributes may yield different generated source files.

There are 4 kinds of contextual changes I can think of: add, delete, change and referential.

Example

Givin a token User, I can think in the following contexts, which exist in different repositories of an App

Back-end

  1. Domain model: Uses Joi Translator to yield user_id, user_name, user_name and user_registred_at attributes
  2. Sequelize model: Uses Sequelize Translator to generate the same attributes as 1
  3. GraphQL type: Uses GrapqQL Translator but renames the tokens attributes in order to not expose my internal database schema, by not using "user_" as a prefix and renaming the token to Custumer

Front-end

  1. Domain model: Uses Joi Translator to yield the same attributes as 3 but also rename the token to Custumer
  2. React component: Translates exactly as the previous point but using PropTypes Translator

Achievement Service

  1. Domain model: Uses Joi Translator to yield user_id attribute, as it is all it needs to send achievements

Why this issue is important

At the moment a translator yields exactly what is described by a domain file.

@mvcds mvcds added available Assign yourself to it! not now roadmap At the moment, contributors think it will be eventually done and removed available Assign yourself to it! labels Apr 14, 2018
@mvcds mvcds added needs more info Further information is requested and removed needs more info Further information is requested labels Apr 14, 2018
@mvcds mvcds added available Assign yourself to it! not now and removed not now labels Apr 14, 2018
@mvcds mvcds added help wanted It's too dangerous to go alone and removed not now labels Apr 22, 2018
@mvcds mvcds added this to the A serious tool milestone May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
available Assign yourself to it! Hacktoberfest help wanted It's too dangerous to go alone roadmap At the moment, contributors think it will be eventually done
Projects
None yet
Development

No branches or pull requests

1 participant