Skip to content

Contexts #33

@mvcds

Description

@mvcds

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HacktoberfestavailableAssign yourself to it!help wantedIt's too dangerous to go aloneroadmapAt the moment, contributors think it will be eventually done

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions