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: add common rarity to magic items rarity enum #332

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

Rmulorm
Copy link
Contributor

@Rmulorm Rmulorm commented Sep 5, 2022

What does this do?

This PR fixes the issue that when quering the API using GraphQL for Magic Items and there is a magic Item with Common Rarity, the API return a 500 response because there no "Common" rarity listed on the enum for the GrapQL.

How was it tested?

Using the Apollo sandbox explorer perform the following query with the following Variables:
Query:

query MagicItemsQuery($equipmentCategory: StringFilter, $order: MagicItemOrder) {
  magicItems(equipment_category: $equipmentCategory, order: $order) {
    index
    name
    desc
    rarity
    equipment_category {
      index
      name
    }
  }
}

Variables

{
  "equipmentCategory": null,
  "order": {
    "by": "EQUIPMENT_CATEGORY",
    "direction": "ASCENDING",
    "then_by": {
      "by": "NAME",
      "direction": "ASCENDING",
    }
  }
}

Is there a Github issue this is resolving?

This resolves issue #331

Was any impacted documentation updated to reflect this change?

<It's not clear if I don't update this text with relevant info>

Here's a fun image for your troubles

random photo - update me

@techwraith
Copy link
Contributor

When can we get this merged and deployed? It's been about a week without a fix.

@SleeplessOne1917
Copy link
Contributor

@bagelbits @fergcb Could one of you approve this and merge it? It seems I missed a spot when making the GraphQL API.

Copy link
Member

@fergcb fergcb left a comment

Choose a reason for hiding this comment

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

LGTM

@bagelbits bagelbits enabled auto-merge (squash) September 13, 2022 19:49
@bagelbits
Copy link
Collaborator

It'll merge in after the tests run. Good catch!

@bagelbits bagelbits merged commit 0f22eb4 into 5e-bits:main Sep 13, 2022
@bagelbits
Copy link
Collaborator

Apparently, @fergcb's approval doesn't count.

@fergcb
Copy link
Member

fergcb commented Sep 13, 2022

Apparently, @fergcb's approval doesn't count.

😢

@github-actions
Copy link

🎉 This PR is included in version 2.5.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@techwraith
Copy link
Contributor

As mentioned in #331, this fix worked great for the original error, but unfortunately there's a new one now: GraphQL error: Enum "MagicItemRarity" cannot represent value: "ARTIFACT"

@techwraith
Copy link
Contributor

Here's PR to fix that error as well: #334

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants