-
Notifications
You must be signed in to change notification settings - Fork 642
dataconnect: Add JavaTimeLocalDateSerializer and KotlinxDatetimeLocalDateSerializer #6519
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Release note changesThe following release notes were modified. Please ensure they look correct. Release Notesfirebase-dataconnect### {{data_connect_short}} version 16.0.0-beta03 {: #data-connect_v16-0-0-beta03}
* {{changed}} Requires Data Connect emulator version 1.6.1 or later for code generation.
* {{feature}} QueryRef and MutationRef gain methods copy(), withDataDeserializer(),
and withVariablesSerializer().
(GitHub [#6424](//github.com/firebase/firebase-android-sdk/issues/6424){: .external})
* {{feature}} GeneratedConnector gains methods copy(), operations(), queries(),
and mutations().
(GitHub [#6424](//github.com/firebase/firebase-android-sdk/issues/6424){: .external})
* {{feature}} GeneratedQuery and GeneratedMutation gain methods copy(),
withVariablesSerializer(), and withDataDeserializer().
(GitHub [#6424](//github.com/firebase/firebase-android-sdk/issues/6424){: .external})
* {{feature}} GeneratedConnector, GeneratedQuery, and GeneratedMutation now
must implement equals() to be a _logical_ comparsion, rather than just
checking for _referencial_ equality using the `===` operator.
(GitHub [#6424](//github.com/firebase/firebase-android-sdk/issues/6424){: .external})
* {{feature}} ExperimentalFirebaseDataConnect annotation added, and some
APIs have been annotated with it, requiring applications that make use of
these experimental APIs to opt-in using
`@OptIn(ExperimentalFirebaseDataConnect::class)` to suppress warnings or
errors related to using these experimental APIs.
(GitHub [#6424](//github.com/firebase/firebase-android-sdk/issues/6424){: .external}) and
(GitHub [#6433](//github.com/firebase/firebase-android-sdk/issues/6433){: .external})
* {{changed}} Replaced java.util.Date with
com.google.firebase.dataconnect.LocalDate.
(GitHub [#6434](//github.com/firebase/firebase-android-sdk/issues/6434){: .external})
* {{changed}} `DateSerializer` removed, as it is superceded by
`LocalDateSerializer`. As of Data Connect emulator version 1.7.0, the
generated Kotlin code uses `com.google.firebase.dataconnect.LocalDate`
instead of `java.util.Date`. Therefore, this version of the SDK must be
paired with code generated by version 1.7.0 (or later) of the Data Connect
emulator.
(GitHub [#6513](//github.com/firebase/firebase-android-sdk/issues/6513){: .external})
* {{feature}} JavaTimeLocalDateSerializer and KotlinxDatetimeLocalDateSerializer
added, to enable using the standard "local date" classes `java.time.LocalDate`
and/or `kotlinx.datetime.LocalDate` instead of the bespoke
`com.google.firebase.dataconnect.LocalDate` class for `Date` GraphQL fields
and variables.
(GitHub [#6519](//github.com/firebase/firebase-android-sdk/issues/6519){: .external})
|
Vertex AI Mock Responses Check
|
aashishpatil-g
approved these changes
Nov 15, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds two new classes to the Data Connect SDK Public API:
JavaTimeLocalDateSerializer
KotlinxDatetimeLocalDateSerializer
These classes enable using the standard "local date" classes
java.time.LocalDate
and/orkotlinx.datetime.LocalDate
instead of the bespokecom.google.firebase.dataconnect.LocalDate
class forDate
custom scalar GraphQL fields.