I am using Apollo client for GraphQL client integrations. I have added the following run script, which is suggested in the official documentation.
cd "${SRCROOT}/${TARGET_NAME}/GraphQL/Open"
$APOLLO_FRAMEWORK_PATH/check-and-run-apollo-codegen.sh generate $(find
. -name '*.graphql') --schema schema.json
--output APIClient.swift
But the problem that is coming up is all the scalar are right now coming up as String.
For Example:- while logging in if I create a mutation of email and password, my schema returns response as JSON while APIClient created shows response as String(instead of JSON).
Due to this there is an error received which says
Apollo.GraphQLResultError(path: ["login", "response"], underlying: Apollo.JSONDecodingError.couldNotConvert
this is because String is received instead of JSON and string can not be converted into required JSON.
Is anyone facing the same issue?