Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(amplify-appsync-simulator): parse AWSTimestamp literals as Ints #6979

Merged
merged 1 commit into from
Apr 9, 2021
Merged

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig commented Mar 29, 2021

Description of changes

This commit updates the AWSTimestamp custom scalar to return literals as integers instead of strings. The AST representation of a literal is always a string, so it needs to be converted to an int before returning it for further processing.

Issue #, if available

#6436

Description of how you validated changes

Manual testing and unit tests added in this PR.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

This commit updates the AWSTimestamp custom scalar to return
literals as integers instead of strings. The AST representation
of a literal is always a string, so it needs to be converted to
an int before returning it for further processing.

Refs: #6436
@cjihrig cjihrig requested a review from a team as a code owner March 29, 2021 16:36
@cjihrig cjihrig linked an issue Mar 29, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Mar 29, 2021

Codecov Report

Merging #6979 (8e1a0c8) into master (27030ea) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6979   +/-   ##
=======================================
  Coverage   56.41%   56.42%           
=======================================
  Files         445      445           
  Lines       21764    21766    +2     
  Branches     4354     4354           
=======================================
+ Hits        12278    12281    +3     
+ Misses       8671     8670    -1     
  Partials      815      815           
Impacted Files Coverage Δ
...sync-simulator/src/schema/appsync-scalars/index.ts 47.31% <100.00%> (+2.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27030ea...8e1a0c8. Read the comment docs.

@jhockett jhockett merged commit 08750a6 into aws-amplify:master Apr 9, 2021
@github-actions github-actions bot added the referenced-in-release Issues referenced in a published release changelog label Apr 14, 2021
@github-actions
Copy link

👋 Hi, this pull request was referenced in the v4.48.0 release!

Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v4.48.0.

@cjihrig cjihrig deleted the convert branch September 30, 2021 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
referenced-in-release Issues referenced in a published release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Amplify GraphiQL error using @key with AWSTimestamp type
4 participants