The Database Hub | Back4App
The Database Hub | Back4App
How it works
  • Log In
  • Sign Up

  1. davimacedo
  2. SWAPI - The Star Wars API
Public

78
259
78
259
  • DatabaseDatabase
  • GraphQL API PlaygroundAPI Playground
  • Get Started GuideGet Started
  • IssuesIssues
  • ContributorsContributors
  • Database
    Database
    Get Started Guide
    Get Started
    Issues
    Issues
    Contributors
    Contributors

All Planets

This GraphQL query fetches All Planets


0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
query allPlanets {
      planets (skip: 0, limit: 3) {
        results {
          ACL
          climate {
              ...on Element {
              value
            }
          }
          createdAt
          diameter
          films (skip: 0, limit: 3) {
            results {
              id
            }
          }
          gravity
          id
          name
          orbitalPeriod
          population
          residents (skip: 0, limit: 3) {
            results {
              id
            }
          }
          rotationPeriod
          species (skip: 0, limit: 3) {
            results {
              id
            }
          }
          surfaceWater
          terrain {
              ...on Element {
              value
            }
          }
          updatedAt
        }
      }
    }
{
  "data": {
    "planets": {
      "results": [
        {
          "ACL": null,
          "climate": [
            {
              "value": "temperate"
            },
            {
              "value": "tropical"
            }
          ],
          "createdAt": "2019-12-13T19:42:31.014Z",
          "diameter": 10200,
          "films": {
            "results": [
              {
                "id": "GteveE4ytb"
              }
            ]
          },
          "gravity": "1 standard",
          "id": "JNgiSeuJwR",
          "name": "Yavin IV",
          "orbitalPeriod": 4818,
          "population": 1000,
          "residents": {
            "results": []
          },
          "rotationPeriod": 24,
          "species": {
            "results": []
          },
          "surfaceWater": 8,
          "terrain": [
            {
              "value": "jungle"
            },
            {
              "value": "rainforests"
            }
          ],
          "updatedAt": "2019-12-13T19:42:35.983Z"
        },
        {
          "ACL": null,
          "climate": [
            {
              "value": "murky"
            }
          ],
          "createdAt": "2019-12-13T19:42:31.017Z",
          "diameter": 8900,
          "films": {
            "results": [
              {
                "id": "RbyX4ouadm"
              },
              {
                "id": "SFHc9Y4gXA"
              },
              {
                "id": "mRAWzGNBfG"
              }
            ]
          },
          "gravity": null,
          "id": "lZHyO0MIr6",
          "name": "Dagobah",
          "orbitalPeriod": 341,
          "population": null,
          "residents": {
            "results": []
          },
          "rotationPeriod": 23,
          "species": {
            "results": []
          },
          "surfaceWater": 8,
          "terrain": [
            {
              "value": "swamp"
            },
            {
              "value": "jungles"
            }
          ],
          "updatedAt": "2019-12-13T19:42:35.983Z"
        },
        {
          "ACL": null,
          "climate": [
            {
              "value": "arid"
            }
          ],
          "createdAt": "2019-12-13T19:42:30.901Z",
          "diameter": 10465,
          "films": {
            "results": [
              {
                "id": "GteveE4ytb"
              },
              {
                "id": "NtEIWnlRYH"
              },
              {
                "id": "RbyX4ouadm"
              }
            ]
          },
          "gravity": "1 standard",
          "id": "PL36fSGLoW",
          "name": "Tatooine",
          "orbitalPeriod": 304,
          "population": 200000,
          "residents": {
            "results": [
              {
                "id": "0teUVBC5WU"
              },
              {
                "id": "1bnytxJvoC"
              },
              {
                "id": "4ce6iNwMJk"
              }
            ]
          },
          "rotationPeriod": 23,
          "species": {
            "results": []
          },
          "surfaceWater": 1,
          "terrain": [
            {
              "value": "desert"
            }
          ],
          "updatedAt": "2019-12-13T19:42:35.983Z"
        }
      ]
    }
  }
}