Skip to content

Is there any way to use defaultNullableToNull as true for all but one field? #197

@ankitprahladsoni

Description

@ankitprahladsoni

Is your feature request related to a problem? Please describe.

We would like to keep the codegen small and eliminate any unnecessary data, so defaultNullableToNull set to true is one of the best options to use. However, we also have a nullable field, which we very frequently use to test our code/component for the majority of the use cases.

For example

type TestingData {
field1: String!
field2: String!
}

type User {
name: String!
testingData: TestingData
}

With defaultNullableToNull set to true, the aUser function always have testingData field set to null

Describe the solution you'd like

There should be a way to override defaultNullableToNull only for a few selected fields/types so that they are auto-filled by the mock data without us adding it manually all the time.

Describe alternatives you've considered

No response

Any additional important details?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions