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

Typing: Infer Type and nullability from the translated field. At least when using the attributes. Ideally in all cases. #1

Open
gmiserez opened this issue Oct 21, 2022 · 0 comments
Labels
enhancement New feature or request Translations This concerns the Translations Package

Comments

@gmiserez
Copy link
Collaborator

gmiserez commented Oct 21, 2022

In the following example, the nullable argument shouldn't be needed since we already now that the array is nullable based on it's C# type:

        [TranslateArray<Episode>("Episodes", nullable: true)]
        public IReadOnlyList<Episode>? AppearsIn { get; }

This should be enough:

        [TranslateArray("Episodes")]
        public IReadOnlyList<Episode>? AppearsIn { get; }

The resulting Schema should be:

type XXX {
   appearsIn: [TranslatedResourceOfEpisode!] 
}
@gmiserez gmiserez added enhancement New feature or request Translations This concerns the Translations Package labels Oct 21, 2022
@gmiserez gmiserez changed the title Typing: Infer nullability from the translated field. At least when using the attributes. Ideally in all cases. Typing: Infer Type and nullability from the translated field. At least when using the attributes. Ideally in all cases. Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Translations This concerns the Translations Package
Projects
None yet
Development

No branches or pull requests

1 participant