Custom scalars on the client side - iOS

I’m using Apollo client iOS version 1.0.6. Trying to add custom scalar to my schema and query. Followed the reference here .

Since I’ using configuration json and build script to auto generate schema and query reference here The Codegen CLI - Apollo GraphQL Docs couldn’t figure out how to pass ```
–passthroughCustomScalars

Any suggestion.
Thanks in advance

@sugan The reference you linked that mentions using passthroughCustomScalars is from the 0.x versions of Apollo. That flag is no longer needed in 1.x versions and your custom scalars will be generated into your operation models and have a typealias created for them that defaults to String type but can be overridden by you for custom implementation. For explanation of the change from 0.x to 1.x versions check this section of our migration guide.

@ZachF-Apollo, Thank you so much for the quick response. It really helped me.

One question - I have added new scalar in my Scheme i.e scalar CustomValue. But when running generate command it doesn’t create a file under CustomScalars. Do I have add them manually?

Note: Code gen doesn’t throw an error

Is you custom scalar type being used in any operations? If a custom scalar is defined in your schema but not used in any operation then it won’t have a file generated because it’s not needed. Once it is being used in an operation it will be generated, also keep in mind these are only generated once and not re-generated with every codegen run to allow you to make the necessary customization to the typealias without having it overridden by codegen.

Thanks again. Somehow when I re-generate files are autogenerated.