-
Couldn't load subscription status.
- Fork 67
Migrate GraphQL serialization to kotlin serialization #351
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
Conversation
- used kotlin serialization for serialization and deserialization in GraphQLClient - migrated DataVaultPaymentMethodTokensAPI to use kotlin serialization and strong data types
| data class GraphQLRequest<V>( | ||
| val query: String, | ||
| val variables: V? = null, | ||
| @kotlinx.serialization.Transient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey what does @kotlinx.serialization.Transient do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it tells serializer not to serialize property
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok. Do we actually need this property? It looks like it's always null.
CorePayments/src/main/java/com/paypal/android/corepayments/graphql/GraphQLClient.kt
Show resolved
Hide resolved
CorePayments/src/main/java/com/paypal/android/corepayments/graphql/GraphQLClient.kt
Show resolved
Hide resolved
CorePayments/src/main/java/com/paypal/android/corepayments/graphql/GraphQLClient.kt
Show resolved
Hide resolved
CorePayments/src/main/java/com/paypal/android/corepayments/graphql/GraphQLClient.kt
Outdated
Show resolved
Hide resolved
| expiry = cardExpiry, | ||
| name = card.cardholderName, | ||
| securityCode = card.securityCode, | ||
| billingAddress = vaultBillingAddress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have billingAddress for Card in iOS for vaulting.
I wonder if that's a requirement.
Maybe we need to add it as an optional field.
The endpoint works without it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is an optional field, nullable in kotlin
Summary of changes
Checklist
Authors