awslabs / awslabs/aws-mobile-appsync-sdk-android
AWSTime is handled as Int not Long in filters
- Dominant language
- Java
- Stars
- 106
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
In the generated android code, the AWSTime scalar type is handled as an integer when filtering, which is wrong as it should be a long.
**To Reproduce**
Steps to reproduce the behavior:
1. Create an Object with an AWSTime member:
`
type Sample @model {
id: ID!
someString: String!
time: AWSTimestamp!
} `
2. After codegeneration your ModelSampleFilterInput.java will look like this:
`public final class ModelSampleFilterInput implements InputType {
private final Input id;
private final Input someString;
private final Input time;`
3. The problem is the use of `ModelIntFilterInput` it takes java ints not longs (the correct representation for awstime)
**Expected behavior**
Expect to have a `ModelLongFilterInput` for AWSTime values
**Environment(please complete the following information):**
- AppSync SDK Version: com.amazonaws:aws-android-sdk-appsync:2.8.+
Contributor guide
Research direction
Start by tracing the code-generation mapping for the AWSTimestamp scalar and compare it with the generated ModelSampleFilterInput.java shown in the report. Reproduce the schema generation from the issue, then verify that the time field uses ModelLongFilterInput rather than ModelIntFilterInput.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, aws, graphql, java
- Domain
- mobile-dev, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100