spacexland / api Goto Github PK
View Code? Open in Web Editor NEW๐ GraphQL & REST APIs to explore all the rockets, launches & other SpaceX's data
Home Page: https://api.spacex.land
License: MIT License
๐ GraphQL & REST APIs to explore all the rockets, launches & other SpaceX's data
Home Page: https://api.spacex.land
License: MIT License
Thank you for the nice Land. I played a bit with rockets ๐
I was able to add users with mutations, but I was not able to play with subscriptions.
subscription {
users {
name
}
}
Here is the result:
{
"errors": [
{
"message": "Cannot return null for non-nullable field Subscription.users.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"users"
],
"extensions": {
"code": "INTERNAL_SERVER_ERROR"
}
}
],
"data": null
}
Do you know if it should work? Or if I have to adapt my query?
Thank you
Hello,
I'm evaluating your API for my (work in progress) iOS client. I was using a "famous" REST API, but I just heard about GraphQL and I thought I would give it a try. Playing around with a GraphQL client I made some queries, but I couldn't find any information about Crew Dragon astronauts. What I'd like to have would be a generic list of every SpaceX astronaut (like the ones for launches, ships, etc.), plus a list of astronauts for every crewed mission (maybe with roles?). Is this already implemented in your API? If not, how could it be implemented? I'm an absolute beginner in GraphQL, and although I found a lot of data on many technical aspects about the rockets (and everything is well-structured, a much better approach than comparing UUIDs across different endpoints, in my opinion), I failed to find this kind of information.
Thank You
Hi @swcarlosrj ๐ It looks like the API is no longer available. Do you need a sponsor based on Heroku's recently published plans to cancel free plans? Otherwise, fly.io has a gorgeous free program, and the deployment is straightforward. You could deploy it to two different regions (US, EU) without paying a penny. If you need any help, ping me.
You could also try to contact Fly.io for OSS sponsorship if you need more. https://fly.io/docs/about/open-source/#recurring-donations
While using the LaunchFind function in the GraphiQL application, I am unable to find 'launch_success' or 'land_success'. In the documentation, they are listed as being of String type, but in the API they are of Boolean type.
I've tried setting my query variable to a String type: "true" or "false". No errors are thrown, however the query returns empty.
I expect to be able to use the LaunchFind function on these two fields: 'launch_success' and 'land_success', however, I'm unable to because the default type defs are incorrect.
`
query launches($success: String) {
launches(find: {launch_success: $success}) {
id
}
}
{
"success": "true"
}
`
I'm using Insomnia to import the swagger.json for the API (I copied it from the repo). There are many validation errors, but generally easy to fix. I fixed them in my local Insomnia project - here is what I found:
"version" property (required) missing from "info" definition at the top of the document. (what is the current version anyway?)
many instances of this error: "$ref": "#/components/schemas/ID" does not exist. In fact, if you go to the swagger UI page of the live API you can see this for yourself if you try to invoke the first method under the default category: GET /rest/capsule/{id}. I replaced all occurrences of "$ref": "#/components/schemas/ID" with "type":"string". This seems to work (at least it works if I pass a string to the /rest/capsule/{id} method referenced above. Not sure if ID should be added to components/schemas as simply a string type or something more complex.
many instances of this error: oas3-schema "200" property must have required property description. These are in the responses collection for each path. I simply added a description for each that stated what the return type was.
many instances if this error: oas3-schema "required" property must not have fewer than 1 items. These are empty arrays in the schema, i.e. "required":[]. I simply removed all references to this property, where the array was empty.
I suspect many tools will reveal these issues, for Insomnia, click on New Document, name the document, and choose "Import File" from the document workspace. Pick the swagger.json file from this project.
(See above)
A clear and concise description of what you expected to happen.
Add any other context about the problem here.
Let us know how to reproduce the issue. Include a code sample, share a project, or share an use case that reproduces the issue using https://codesandbox.io/s/github/spacexland/api.
When attempting to retrieve data on all Launches related fields, the GraphQL API for SpaceX endpoint returns error.
It seems there is a limitation on the number of levels deep within the JSON hierarchy.
0: {message: "query exceeds complexity limit", locations: [{line: 1, column: 1}],โฆ}
extensions: {code: "GRAPHQL_VALIDATION_FAILED"}
code: "GRAPHQL_VALIDATION_FAILED"
locations: [{line: 1, column: 1}]
0: {line: 1, column: 1}
column: 1
line: 1
message: "query exceeds complexity limit"
The fields that return Unix dates should not be Date
type:
Steps to reproduce the behavior:
Run the following query:
{
launchesPast(limit: 10) {
mission_name
launch_date_local
launch_date_unix
launch_date_utc
}
}
The launch_date_unix
returns numbers (as it is a Unix time) but other fields return Date:
The Date fields return data in a consistent way
List of features to implement:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.