Public
Documentation Settings

SpaceX.Land GraphQL

A Demo Collection of using GraphQL in Postman, using the most appropriate service SpaceX.Land! This endpoint curates open source SpaceX data from Reddit, and is not an offically supported SpaceX API.

POSTQuery: missions

https://api.spacex.land/graphql/

GraphQL mutation to delete users

Example Request
curl
curl --location 'https://api.spacex.land/graphql/' \
--header 'Content-Type: application/json' \
--data '{"query":"{\n  missions {\n    description\n    payloads {\n      payload_type\n    }\n  }\n}","variables":{}}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

POSTQuery: launch by id

https://api.spacex.land/graphql/

GraphQL mutation to delete users

Bodygraphql
Query
graphql
query ($id: ID!){
  launch(id: $id) {
    id
    launch_site {
      site_id
      site_name_long
      site_name
    }
    mission_name
    rocket {
      rocket_name
      rocket_type
    }
  }
}
GraphQL Variables
json
{
    "id": "21"
}
Example Request
curl
curl --location 'https://api.spacex.land/graphql/' \
--header 'Content-Type: application/json' \
--data '{"query":"query ($id: ID!){\n  launch(id: $id) {\n    id\n    launch_site {\n      site_id\n      site_name_long\n      site_name\n    }\n    mission_name\n    rocket {\n      rocket_name\n      rocket_type\n    }\n  }\n}","variables":{"id":"21"}}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers

POSTMutation: insert_users

https://api.spacex.land/graphql/

GraphQL mutation to delete users

Example Request
curl
curl --location 'https://api.spacex.land/graphql/' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation {\n  insert_users(objects: {name: \"Name\", rocket: \"Falcon\", twitter: \"@myHandle\"}) {\n    returning {\n      name\n      id\n      rocket\n      twitter\n    }\n  }\n}","variables":{}}'
Example Response
No response body
This request doesn't return any response body
No response headers
This request doesn't return any response headers