Skip to content

Commit

Permalink
refactor: apply suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Phil Pluckthun <phil@kitten.sh>
  • Loading branch information
llllvvuu and kitten committed Mar 3, 2024
1 parent 4f94a8e commit c21529a
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,9 @@ type getInputObjectTypeRec<
Rest,
Introspection,
(InputField extends { name: any; type: any }
? InputField extends { type: { kind: 'NON_NULL' } }
? InputField extends { defaultValue: infer DefaultValue }
? DefaultValue extends undefined | null
? { [Name in InputField['name']]: unwrapType<InputField['type'], Introspection> }
: {
[Name in InputField['name']]?: unwrapType<
InputField['type'],
Introspection
> | null;
}
: { [Name in InputField['name']]: unwrapType<InputField['type'], Introspection> }
: {
[Name in InputField['name']]?: unwrapType<InputField['type'], Introspection> | null;
}
? InputField extends { defaultValue?: undefined | null; type: { kind: 'NON_NULL' } }
? { [Name in InputField['name']]: unwrapType<InputField['type'], Introspection> }
: { [Name in InputField['name']]?: unwrapType<InputField['type'], Introspection> | null }
: {}) &
InputObject
>
Expand Down

0 comments on commit c21529a

Please sign in to comment.