You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default, when using Apollo Kotlin with the Amplify Apollo Extensions, all of the custom scalars in AppSync get generated as Any type. This makes it awkward to use e.g. the createdAt field in a generated Apollo model.
In the actual returned data the Any field can be cast to a String (its actual type) and then parsed into e.g. an Instant, but this is sub-optimal for many reasons. Ideally the scalar GraphQL type AWSDateTime would already be converted into a platform-appropriate type.
This can be done in Apollo by defining adapters for Custom Scalars.
This issue covers adding support for the AWS-specific Scalars present in AppSync schemas to the extensions library.
Ideally this would include any necessary runtime classes, Apollo adapter implementations, and instructions on how to configure the Apollo Gradle Plugin.
Initialization steps (if applicable)
No response
Code Snippet
n/a
amplifyconfiguration.json
No response
GraphQL Schema
n/a
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered:
This issue was opened by a maintainer of this repository; updates will be posted here. If you are also experiencing this issue, please comment here with any relevant information so that we're aware and can prioritize accordingly.
Before opening, please confirm:
Language and Async Model
Kotlin, Kotlin - Coroutines
Amplify Categories
Not applicable
Gradle script dependencies
n/a
Environment information
n/a
Please include any relevant guides or documentation you're referencing
https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html
Describe the feature request
By default, when using Apollo Kotlin with the Amplify Apollo Extensions, all of the custom scalars in AppSync get generated as
Any
type. This makes it awkward to use e.g. thecreatedAt
field in a generated Apollo model.In the actual returned data the
Any
field can be cast to a String (its actual type) and then parsed into e.g. anInstant
, but this is sub-optimal for many reasons. Ideally the scalar GraphQL typeAWSDateTime
would already be converted into a platform-appropriate type.This can be done in Apollo by defining adapters for Custom Scalars.
This issue covers adding support for the AWS-specific Scalars present in AppSync schemas to the extensions library.
Ideally this would include any necessary runtime classes, Apollo adapter implementations, and instructions on how to configure the Apollo Gradle Plugin.
Initialization steps (if applicable)
No response
Code Snippet
n/a
amplifyconfiguration.json
No response
GraphQL Schema
n/a
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: