-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Strange generation of nullable and non-nullable lists #309
Comments
👋 @meg4cyberc4t This library is created and maintained by me, @budde377. Please consider supporting my work and ensure our survival by donating here. |
To be honest, I don't fully understand how the values in the default input are processed on the client side. factory Input$DisciplineTopicContentInput({
required String howStudyIt,
required List<Input$InfoDisciplineTopicContentBlockInput> infoContentBlocks,
required List<Input$TaskDisciplineTopicContentBlockInput> taskContentBlocks,
List<Input$TestDisciplineTopicContentBlockInput>? testContentBlocks,
required String whyStudyIt,
}) =>
Input$DisciplineTopicContentInput._({
r'howStudyIt': howStudyIt,
r'infoContentBlocks': infoContentBlocks,
r'taskContentBlocks': taskContentBlocks,
if (testContentBlocks != null) r'testContentBlocks': testContentBlocks,
r'whyStudyIt': whyStudyIt,
}); But because of this nullable value, the generation of "_CopyWithImpl$Input$DisciplineTopicContentInput" crashes |
For enough context: graphql: ^5.2.0-beta.1 |
I've recently changed how input with default values are generated and it would seem like I've missed a few places. Let me investigate! |
Hi. Is there any updates for me?) |
Sorry Igor, I have been busy moving. I am to look at this this weekend!
…On Fri, Sep 15, 2023 at 7:58 AM Igor Molchanov ***@***.***> wrote:
Hi. Is there any updates for me?)
—
Reply to this email directly, view it on GitHub
<#309 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA2UFS7UJEZDIKW7MHJ6YBTX2P4ARANCNFSM6AAAAAA4AHNHOM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
A fix should be released now as |
It looks great! Thanks! |
Hi.
I have this input in my schema.graphql.
You can see that "testContentBlocks" is not an updatable list with a default value. And "taskContentBlocks" is the same, but does not have a default value.
But they are generated in different ways, it confuses me exactly:
"testContentBlocks" has become nullable.. but however, in the rest of the code, it is still considered non-null.
-- This is an example where my linter indicates the use of a list without an operator ?.
As a result, an error occurs when building the application.
The text was updated successfully, but these errors were encountered: