Skip to content

Conversation

@bajtos
Copy link
Member

@bajtos bajtos commented Jun 25, 2019

  • Extract the code building schema title suffix (e.g. WithRelations) into a new function getTitleSuffix
  • Rework the function buildModelCacheKey to leverage getTitleSuffix under the hood

This change simplifies the process of adding a new schema option, as there is only a single place to modify (getTitleSuffix) now.

See #3199

Checklist

👉 Read and sign the CLA (Contributor License Agreement) 👈

  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

…d cache key

- Extract the code building schema title suffix (e.g. `WithRelations`)
  into a new function `getTitleSuffix`
- Rework the function `buildModelCacheKey` to leverage `getTitleSuffix`
  under the hood

This change simplifies the process of adding a new schema option,
as there is only a single place to modify (`getTitleSuffix`) now.

Signed-off-by: Miroslav Bajtoš <mbajtoss@gmail.com>
Copy link
Contributor

@b-admike b-admike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Contributor

@nabdelgadir nabdelgadir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@emonddr emonddr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@bajtos bajtos merged commit b005d9f into master Jun 25, 2019
@delete-merged-branch delete-merged-branch bot deleted the refactor/schema-cache-key branch June 25, 2019 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants