I ran into an issue when using AWSEmail and AWSURL custom scalars. I added data in my schema that uses them but when trying to query the information I get the following error:
"message": "Unknown type \"AWSEmail\". Did you mean \"AWSDate\"?",
That seems weird considering that the scalars are added in schemaWrapper.js. The problem seems to be the name of the GraphQLScalarType as defined in the original package (@okgrow/graphql-scalars) which is EmailAddress.
I tried overwriting the name by adding the line
EmailAddress.name = 'AWSEmail';
Which apparently solves the problem. I'm not sure if that is a correct solution to this, so I'm just putting this info out here as an issue.
I ran into an issue when using AWSEmail and AWSURL custom scalars. I added data in my schema that uses them but when trying to query the information I get the following error:
That seems weird considering that the scalars are added in
schemaWrapper.js
. The problem seems to be the name of theGraphQLScalarType
as defined in the original package (@okgrow/graphql-scalars
) which isEmailAddress
. I tried overwriting the name by adding the lineWhich apparently solves the problem. I'm not sure if that is a correct solution to this, so I'm just putting this info out here as an issue.