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

Fix CircleCI error caused by GraphQL change to GraphAPI.FlaggingKind #1985

Merged
merged 2 commits into from Mar 19, 2024

Conversation

amy-at-kickstarter
Copy link
Contributor

@amy-at-kickstarter amy-at-kickstarter commented Mar 19, 2024

📲 What

  • Add graphql-schema.json to dependency list for Apollo update script
  • Change type of CreateFlaggingInput from GraphAPI.FlaggingKind to GraphAPI.NonDeprecatedFlaggingKind

🤔 Why

Ingerid encountered this issue in a CircleCI build. Looks like we were running the Apollo update script on Circle, and it was making changes to GraphAPI.swift which broke her build. This fixes both the change to the schema, as well as makes sure that future updates to the schema will correctly cause a re-run of the Apollo build script.

@amy-at-kickstarter amy-at-kickstarter marked this pull request as ready for review March 19, 2024 19:33
@@ -810,7 +805,7 @@ public enum GraphAPI {
}
}

public static var allCases: [FlaggingKind] {
public static var allCases: [NonDeprecatedFlaggingKind] {
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 rename is the source of the problem.

@amy-at-kickstarter amy-at-kickstarter force-pushed the feat/adyer/fix-nondeprecatedflaggingkind-bug branch from 6fd9b2b to 65d72d8 Compare March 19, 2024 20:39
@@ -84,7 +84,7 @@ let reportSpamSubListItems = [
),
ReportProjectInfoListItem(
type: .child,
flaggingKind: .abuse,
flaggingKind: .guidelinesAbuse,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@scottkicks This is the one material change here - NonDeprecatedFlaggingKind does not include .abuse but it does include .guidelinesAbuse. What are these enums ultimately used for? Does it matter?

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 just tested it on staging and was able to submit a report - I tried IP and Abuse. Both look sane:
Screenshot 2024-03-19 at 4 48 28 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

They're used to determine the category reason why users are reporting. I think this should be fine

@nativeksr
Copy link
Collaborator

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@amy-at-kickstarter amy-at-kickstarter merged commit 2187c15 into main Mar 19, 2024
5 checks passed
@amy-at-kickstarter amy-at-kickstarter deleted the feat/adyer/fix-nondeprecatedflaggingkind-bug branch March 19, 2024 23:32
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.

None yet

4 participants