SpaceXLand / api

🚀 GraphQL & REST APIs to explore all the rockets, launches & other SpaceX's data
https://api.spacex.land
MIT License
211 stars 43 forks source link

Seems like the API is down. Can't access base URL https://api.spacex.land/. 503 Error. #241

Open Joshua-romil opened 1 year ago

itscarlosrufo commented 1 year ago

It seems the DB is down, it may be related to this. I am not maintaining this project anymore, if the DB has shut down, sadly, I'll have to do the same with the API.

michael-watson commented 1 year ago

This is very sad, @itscarlosrufo I know you've done a lot of work here and thank you for all the contributions to this project. I'm planning on trying to re-create this effort with the new v2 API and having a hosted URL for everyone.

I will try to get the exact schema working, but it might have to change based on the new API.

itscarlosrufo commented 1 year ago

Indeed @michael-watson, I hope to see a new GraphQL version soon. Let me know if you'd be interested in owning the current domain!

michael-watson commented 1 year ago

I have a new API at https://main--spacex-l4uc6p.apollographos.net/graphql that anyone can use 🎉 🚀

@itscarlosrufo I'm happy to do whatever, if you want to just point the old domain at this new URL that would work. Also fine with taking over the domain if you don't want to have to deal with the renewals (I can probably just add it to Apollo's list). A big thank you 🙇 for having supported this for so many years!

All of the code is here: https://github.com/apollographql/spacex ☝️ Although the schema is identical, I had to make some concessions on certain fields/data where there was a discrepancy between what the MongoDB offered and what the legacy REST API offers. The legacy REST API is also going to be unmaintained but the team says they're going to keep the API up to not break internet URLs. I've marked some fields deprecated, the main one I can think of is Mission root queries because that isn't available (or it's named something else - https://github.com/r-spacex/SpaceX-API).

It is a big API and if you get null for a field, it's probably a bug in the response being parsed. This API could be iterated on, but the Launch Library v2 is probably the better path forward in the long run. I've started up a project on that and I plan on setting that repo up in a special way for first time contributors/users interested in OSS experience.

Check out Space Devs here, it's all hosted on Netlify as a fullstack app with Next.js and I'll be updating the README shortly.

adrians5j commented 1 year ago

Thank you @michael-watson! You're a star! ⭐ 🤩

kyla100 commented 1 year ago

No one is maintaining https://api.spacex.land/ anymore?

michael-watson commented 1 year ago

@kyla100 unfortunately the MongoDB that was being used has been taken down. We re-created the API over at https://github.com/apollographql/spacex that gives you an option to use instead. Let me know if something doesn't work for you, I've been seeing a lot of usage with that project lately.

IgorPaluch commented 1 year ago

@michael-watson why do I get response like this: cess to fetch at 'https://main--spacex-l4uc6p.apollographos.net/graphql' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. It means I'am not allowed to use it from localhost?

masaok commented 1 year ago

@michael-watson why do I get response like this: cess to fetch at 'https://main--spacex-l4uc6p.apollographos.net/graphql' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. It means I'am not allowed to use it from localhost?

Same here. But, for me, it only works from localhost, not from a deployment/hosting service like Vercel.

michael-watson commented 1 year ago

We just made the decision to allow all origins and reconfigured the CORS settings. @masaok @IgorPaluch you should be able to start using this 🙏