aws / aws/aws-appsync-community

Feature request: Support for the Long datatype (64 bit integer)

Open
#21 27 comments 16 reactions 0 assignees View on GitHub
feature-request
Dominant language
HTML
Stars
507
Forks
37
PR merge metrics
No merged PRs in 30d

Description

DynamoDB's "Number" type supports large numbers that can be represented with Long.

From the docs https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html:

```
Number
Numbers can be positive, negative, or zero. Numbers can have up to 38 digits precision. Exceeding this results in an exception.

Positive range: 1E-130 to 9.9999999999999999999999999999999999999E+125

Negative range: -9.9999999999999999999999999999999999999E+125 to -1E-130
```

So if we are getting data from a DynamoDB table via AppSync, if there's a field that is of a "Long" type, AppSync should support a corresponding data type that can parse and serialize the data properly, instead of throwing an error.
```
Can't serialize value (/queryItems/LongProperty) : Expected type 'Int' but was 'Long’.
```

Contributor guide

Open the contributing guide

Research direction

Start with the AppSync GraphQL path that maps DynamoDB Number values, and review the linked DynamoDB data-type documentation and the discussion on this issue. Confirm how Long values are currently parsed and serialized, then verify that a Long-valued field no longer produces the reported Expected type 'Int' error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, graphql
Domain
api, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.