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

feat: TS migration for GraphQL Resolvers #342

Merged
merged 14 commits into from
Dec 15, 2022
Merged

Conversation

bagelbits
Copy link
Collaborator

@bagelbits bagelbits commented Dec 3, 2022

What does this do?

  • Migrates all the GraphQL Resolvers to Typescript
  • Updates some models to match reality
  • Update documentation to match reality

How was it tested?

npm run build and CI

Is there a Github issue this is resolving?

No

Was any impacted documentation updated to reflect this change?

Yup!

Here's a fun image for your troubles

image

@bagelbits bagelbits changed the title fix: TS migration for GraphQL Resolvers feat: TS migration for GraphQL Resolvers Dec 8, 2022
@bagelbits bagelbits marked this pull request as ready for review December 8, 2022 23:12
})),
starting_equipment_options: async (background: Background) =>
background.starting_equipment_options.map(async option => {
if ('equipment_category' in option.from) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure if this if is necessary. Also, since it's inside a map function, it's a bit strange seeing that if the if failed the function wouldn't return a value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I had to do this in a lot places due to how types for choices are currently setup. Otherwise I get:

Property 'equipment_category' does not exist on type 'OptionSet'.
  Property 'equipment_category' does not exist on type 'OptionsArrayOptionSet'.

@bagelbits bagelbits merged commit 6135bf9 into main Dec 15, 2022
@bagelbits bagelbits deleted the bagelbits.ts-resolvers branch December 15, 2022 22:43
@github-actions
Copy link

🎉 This PR is included in version 2.9.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants