little-bear-labs / aws-utils

Apache License 2.0
56 stars 35 forks source link

AppSync Emulator - AWSEmail and AWSURL #159

Open diegoTiscarenoWizeline opened 5 years ago

diegoTiscarenoWizeline commented 5 years ago

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.

lightsofapollo commented 5 years ago

🤔 weird I thought we had tests for this too... I will investigate. Thanks for reporting!