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

[Apollo] Support AWS AppSync custom scalars #2978

Open
1 task done
mattcreaser opened this issue Jan 16, 2025 · 1 comment
Open
1 task done

[Apollo] Support AWS AppSync custom scalars #2978

mattcreaser opened this issue Jan 16, 2025 · 1 comment
Labels
apollo appsync Issues related to the Apollo AppSync Extensions feature-request Request a new feature

Comments

@mattcreaser
Copy link
Member

mattcreaser commented Jan 16, 2025

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. 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

@github-actions github-actions bot added the pending-triage Issue is pending triage label Jan 16, 2025
Copy link
Contributor

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.

@mattcreaser mattcreaser added feature-request Request a new feature apollo appsync Issues related to the Apollo AppSync Extensions and removed pending-triage Issue is pending triage labels Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apollo appsync Issues related to the Apollo AppSync Extensions feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

1 participant