Add documentation about using PrivateRelation#1266
Open
alexdunae wants to merge 1 commit intoShopify:mainfrom
Open
Add documentation about using PrivateRelation#1266alexdunae wants to merge 1 commit intoShopify:mainfrom
alexdunae wants to merge 1 commit intoShopify:mainfrom
Conversation
Author
|
I've just signed the CLA |
KaanOzkan
approved these changes
Nov 9, 2022
Contributor
There was a problem hiding this comment.
This looks good to me but I'm not 100% sure on its placement. We can add it to https://github.com/Shopify/tapioca/wiki/Migrating-to-Tapioca as well.
You'll also have to update the documentation on the compiler file itself.
| end | ||
| ~~~ | ||
|
|
||
| As the name suggests, this will give you type checking during development but disable it at runtime. |
Contributor
There was a problem hiding this comment.
It might be beneficial to give a bit more information here about how Tapioca defines methods on PrivateRelation that returns a Post type. For example, the first! method. That's why this approach gives more static typing benefits.
But I didn't use sorbet-rails and if you think this information is already assumed by an existing sorbet-rails user than it's okay to omit it.
|
This looks like it could be a solution for #1140 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
I was migrating from sorbet-rails and couldn't find a migration path for
RelationType. I searched the Slack channel and came up with this suggestion. I figured it would be helpful to others.Implementation
n/a
Tests
just docs