AWSTimestamp on input becomes Int on the condition
See original GitHub issueBefore opening, please confirm:
- I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- I have searched for duplicate or closed issues.
- I have read the guide for submitting bug reports.
- I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v12.18.0
Amplify CLI Version
4.45.0
What operating system are you using?
MacOs
Amplify Categories
api
Amplify Commands
codegen
Describe the bug
I have a model
type Player @aws_iam
@aws_cognito_user_pools {
lastinteraction: AWSTimestamp
...
}
and the codegen
commands generates
input ModelPlayerConditionInput {
lastinteraction: ModelIntInput
...
}
where ModelIntInput
is:
input ModelIntInput {
ne: Int
eq: Int
le: Int
lt: Int
ge: Int
gt: Int
between: [Int]
attributeExists: Boolean
attributeType: ModelAttributeTypes
}
However Int
is not enough for a timestamp, since from the documentation Int
can hold at most 2^32, but the timestamp is something like 2^40
Expected behavior
Sincerely i don’t know, maybe aFloat
can be used, but it’s obviously not the best choice since maybe a Long
might be what we want
Reproduction steps
Implement that model and then generate all the default mutations
Log output
No response
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Scalar types in AWS AppSync
AWS AppSync scalars list · AWSTimestamp. An integer value representing the number of seconds before or after 1970-01-01-T00:00Z . · AWSEmail. An email...
Read more >Why does a GraphQL query return null? - Stack Overflow
So, in my schema (on the AppSync console) I had this: type TypeName { id: ID! ... _version: Int! _deleted: Boolean _lastChangedAt: AWSTimestamp!...
Read more >Exploring GraphQL Directives in the Wild | StepZen blog
Data mocking; Improving performance; Input validation; Logging; Security; Setting default values; User authorization control. Some time ago, I ...
Read more >Bing's Tech Notes - AppSync - Google Sites
GraphQL, real time (MQTT) & offline programming. Integrate with DynamoDB (schema -> resource, import from existing DynamoDB table).
Read more >API (GraphQL) - Define your model types - AWS Amplify Docs
Filter input objects that allow you to filter objects in list queries and ... ID } input ModelIntFilterInput { ne: Int eq: Int...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
yes yes sure, I’ve just divided the millis by 1000 and casted to Int, and job done, thank you
This issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels for those types of questions.