Apollo Casting Issue with GraphQLNullable Types(InputDict)

I seem to be having an issue with casting when creating/initializing my data.

struct SearchUserInput: InputObject {
public private(set) var __data: InputDict

public init(_ data: InputDict) {
  __data = data

public init(
  birthday: GraphQLNullable<DateTime> = nil,
  email: GraphQLNullable<String> = nil,
  name: String,
  phone: GraphQLNullable<String> = nil
) {
  __data = InputDict([
    "birthday": birthday,
    "email": email,
    "name": name,
    "phone": phone

where InputDict value is of type GraphQLOperationVariableValue

so when doing this:

SearchUserInput(birthday: input.birthday, email: input.email, name: input.name)

i get the error:

Could not cast value of type ‘Swift.Optional<ApolloAPI.GraphQLOperationVariableValue>’ (0x119d50448) to ‘ApolloAPI.GraphQLNullable<Swift.String>’ (0x119d52330).

name seems to work (basic Swift string) but the GraphQLNullable types seem to be where the issue is. Does the generated model need to change here or what need to happen to make this work?

the wrapper code for InputDict is:

/// A structure that wraps the underlying data dictionary used by InputObjects.

public struct InputDict: GraphQLOperationVariableValue, Hashable {

private var data: [String: GraphQLOperationVariableValue]

public init(_ data: [String: GraphQLOperationVariableValue] = [:]) {

self.data = data


public var _jsonEncodableValue: (any JSONEncodable)? { data._jsonEncodableObject }

public subscript<T: GraphQLOperationVariableValue>(key: String) → T {

get { data[key] as! T }

set { data[key] = newValue }


public static func == (lhs: InputDict, rhs: InputDict) → Bool {

lhs.data._jsonEncodableValue?._jsonValue == rhs.data._jsonEncodableValue?._jsonValue


public func hash(into hasher: inout Hasher) {



so does that mean you can only send in values that are Bool or String in the key,value pairs?