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

Add past ability data structure #848

Merged
merged 12 commits into from Oct 16, 2023

Conversation

revoice1
Copy link
Contributor

  • Code to add a data structure for past_abilities data to the pokemon endpoint.
  • Took my best attempt at mimicking the implementation of past_types for this
  • Tested with a local docker setup, below is a truncated output from zapdos with the changes included from http://localhost/api/v2/pokemon/145/
{"id":145,"name":"zapdos"..."past_abilities":[{"generation":{"name":"generation-v","url":"http:\/\/localhost\/api\/v2\/generation\/5\/"},"abilities":[{"is_hidden":true,"slot":3,"ability":{"name":"lightning-rod","url":"http:\/\/localhost\/api\/v2\/ability\/31\/"}}]}]...

@Naramsim
Copy link
Member

Cool! Thanks a lot! I'll review it when I have some time

@Naramsim
Copy link
Member

About the graphql part, did you write the files by yourself or did you generate them using Hasura?

@revoice1
Copy link
Contributor Author

About the graphql part, did you write the files by yourself or did you generate them using Hasura?

I wrote it myself using the bit past_types as a ref. I'm not super familiar with the stack so I wasn't 100% sure how to have it automatically, and maybe properly 😅, generated.

@Naramsim
Copy link
Member

Ok, because those are auto generated. Can you please remove them from the PR?

@revoice1
Copy link
Contributor Author

revoice1 commented Feb 27, 2023

Removed the manual graphql changes and properly autogenerated the new migration.

Did you want me to export the autogenerated hasura export and include in this PR? As the schema needs to be updated to include the new table. Or did you want to handle that separately?

Thanks again for your attention on this it has been a good learning experience for me.

@Naramsim
Copy link
Member

Hi, sorry for coming back only now, I push this PR on the staging branch. Can you please check tomorrow or when you are free if your contributions are available at: https://staging.pokeapi.co/api/v2/

@revoice1
Copy link
Contributor Author

revoice1 commented Oct 8, 2023

Sorry, coming back to this super late. I don't know if this data is still intended to be in staging, but I don't see the past_abilities attribute on the pokes that I would expect.

@Naramsim
Copy link
Member

Naramsim commented Oct 9, 2023

no, it's not there, I'll schedule a build again

@Naramsim
Copy link
Member

Naramsim commented Oct 9, 2023

Ok, can you check in a few hours ?

if this build succeeds? https://app.circleci.com/pipelines/github/PokeAPI/pokeapi/950/workflows/8ec8db75-4aeb-4d18-8eee-f168e39c8be8

@revoice1
Copy link
Contributor Author

revoice1 commented Oct 9, 2023

The staging data looks good to me. The past_abilities node is present with the data I would expect.

https://staging.pokeapi.co/api/v2/pokemon/94

@Naramsim
Copy link
Member

Ok, I'll merge, let's see :)

@Naramsim Naramsim merged commit b7eb083 into PokeAPI:master Oct 16, 2023
3 of 4 checks passed
@pokeapi-machine-user
Copy link

A PokeAPI/api-data refresh has started. In 45 minutes the staging branch of PokeAPI/api-data will be pushed with the new generated data.

The staging branch will be deployed in our staging environment and you will be able to review the entire API.

A Pull Request (master<-staging) will be also created at PokeAPI/api-data and assigned to the PokeAPI Core team to be reviewed. If approved and merged new data will soon be available worldwide at pokeapi.co.

@pokeapi-machine-user
Copy link

The updater script has finished its job and has now opened a Pull Request towards PokeAPI/api-data with the updated data.

You can see the Pull Request deployed at our staging environment when CircleCI deploy will be finished (check the started time of the last build).

Naramsim pushed a commit to PokeAPI/api-data that referenced this pull request Oct 17, 2023
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

3 participants