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

MBL-1177: Add CompleteOnSessionCheckoutMutation to GraphAPI #1981

Merged

Conversation

amy-at-kickstarter
Copy link
Contributor

📲 What

Add CompleteOnSessionCheckoutMutation to GraphAPI.

🤔 Why

This is a new mutation for post-campaign pledging. I modeled it after the mutation it will replace, createBacking, having it return a CheckoutFragment.

👀 See

Trello, screenshots, external resources?

@amy-at-kickstarter amy-at-kickstarter force-pushed the feat/adyer/MBL-1177/CreateBackingOnCheckoutMutation branch from d342558 to ece7313 Compare March 18, 2024 17:18
@amy-at-kickstarter amy-at-kickstarter requested review from a team and scottkicks and removed request for a team March 18, 2024 17:18
@amy-at-kickstarter amy-at-kickstarter marked this pull request as ready for review March 18, 2024 17:18
@amy-at-kickstarter amy-at-kickstarter changed the title MBL-117: Add CompleteOnSessionCheckoutMutation to GraphAPI MBL-1177: Add CompleteOnSessionCheckoutMutation to GraphAPI Mar 18, 2024

extension GraphAPI.CompleteOnSessionCheckoutMutation.Data: Decodable {
public init(from _: Decoder) throws {
fatalError("The test code should not actually be decoding this object.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required for us to use performWithResult. I'm fairly sure the Decodable requirement is for Apollo, not for the MockGraphQLClient, which doesn't actually do any decoding.

@@ -77,6 +77,9 @@ public protocol ServiceType {
func createBacking(input: CreateBackingInput) ->
SignalProducer<CreateBackingEnvelope, ErrorEnvelope>

func completeOnSessionCheckout(input: GraphAPI.CompleteOnSessionCheckoutInput) ->
SignalProducer<GraphAPI.CompleteOnSessionCheckoutMutation.Data, ErrorEnvelope>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to move away from wrapper objects unless we really need them - implementing this as its raw GraphQL types for now; if we need to write a wrapper later, I'm OK doing that just-in-time.

@amy-at-kickstarter amy-at-kickstarter force-pushed the feat/adyer/MBL-1177/CreateBackingOnCheckoutMutation branch from ece7313 to b09f77f Compare March 18, 2024 19:34
@amy-at-kickstarter amy-at-kickstarter force-pushed the feat/adyer/MBL-1177/CreateBackingOnCheckoutMutation branch from b09f77f to 567dec9 Compare March 18, 2024 19:35
@amy-at-kickstarter amy-at-kickstarter merged commit 6e703f3 into main Mar 18, 2024
5 checks passed
@amy-at-kickstarter amy-at-kickstarter deleted the feat/adyer/MBL-1177/CreateBackingOnCheckoutMutation branch March 18, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants