deliton / eldenring-api

Open source API for the awesome Elden Ring game :)
243 stars 33 forks source link

FIX: Allow lookup of _scaling_ values in GQL #9

Closed julesferreira closed 2 years ago

julesferreira commented 2 years ago

A typo in a GQL field leads to an attempted lookup of a nonexistent JSON key. Update the schema and corresponding documentation.

Loving the API! I noticed scaling tiers were returning null from the GQL endpoint- looks like a little typo:

Request

# extra L in `scalling`, as defined in GQL schema
curl 'https://eldenring.fanapis.com/api/graphql' -H 'Content-Type: application/json' --data-binary '{"query":"{getWeapon(id:\"17f69d12746l0i1ojbzxzgz6gfjsi\"){name scalesWith{name scalling}}}"}'

Response

{"data":{"getWeapon":{"name":"Longbow","scalesWith":[{"name":"Str","scalling":null},{"name":"Dex","scalling":null}]}}}
vercel[bot] commented 2 years ago

Someone is attempting to deploy a commit to a Personal Account owned by @deliton on Vercel.

@deliton first needs to authorize it.

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

docs-eldenring-api – ./docs

🔍 Inspect: https://vercel.com/deliton/docs-eldenring-api/3E1fWF2v4dMNZ5Ju6mW2emMYcg1u
✅ Preview: https://docs-eldenring-api-git-fork-julesferreira-fix-sc-773c82-deliton.vercel.app

eldenring-api – ./api

🔍 Inspect: https://vercel.com/deliton/eldenring-api/EzZsdBXqfPkXNMkfVDY73vofvgG5
✅ Preview: https://eldenring-api-git-fork-julesferreira-fix-scaling-typo-deliton.vercel.app

deliton commented 2 years ago

Nice catch! PR looks good. I'll do some quick testing with the preview version and then merge it. Thanks for the PR @julesferreira

deliton commented 2 years ago

All seems to be working, thanks!

image