title: How to GET variables from an Array from external API?
body: <p>I'm starting with Apollo GraphQL (Using Axios), and i'm facing a problem when an external API send an ARRAY.
  I can't get the variables inside the objects.
  I've already tried in several ways, and can't find help anywhere.</p>
  
  <pre><code>const axios = require ('axios');
  
  
  const {GraphQLObjectType, GraphQLSchema, GraphQLInt,
       GraphQLList, GraphQLString } = require('graphql');
  
  
  const FeedingType = new GraphQLObjectType({
      name: 'Feeding',
      fields: () =&gt; ({
          sentry_objects : {type : new GraphQLList(SentryType)},
      })
  })
  
  //Sentry Objects
  const SentryType = new GraphQLObjectType({
      name: 'Sentry',
      fields: () =&gt; ({
          designation : {type : GraphQLString},
      })
  })
  
  //Root Query
  const RootQuery = new GraphQLObjectType({
      name: 'RootQueryType',
      fields: {
          sentry: {
              type: new GraphQLList(SentryType),
              resolve(parent, args){
                  return axios
                  .get('https://api.nasa.gov/neo/rest/v1/neo/sentry?is_active=true&amp;page=0&amp;size=50&amp;api_key=DEMO_KEY')
                  .then(res =&gt; res.data);
              }
          },
  </code></pre>
  
  <p>And that's the JSON from API:</p>
  
  <pre><code>{
    "links": {
      "next": "https://api.nasa.gov/neo/rest/v1/neo/sentry?is_active=true&amp;page=1&amp;size=50&amp;api_key=DEMO_KEY",
      "self": "https://api.nasa.gov/neo/rest/v1/neo/sentry?is_active=true&amp;page=0&amp;size=50&amp;api_key=DEMO_KEY"
    },
    "page": {
      "size": 50,
      "total_elements": 908,
      "total_pages": 19,
      "number": 0
    },
    "sentry_objects": [
      {
        "links": {
          "near_earth_object_parent": "https://api.nasa.gov/neo/rest/v1/neo/3012393?api_key=DEMO_KEY",
          "self": "https://api.nasa.gov/neo/rest/v1/neo/sentry/3012393?api_key=DEMO_KEY"
        },
        "spkId": "3012393",
        "designation": "1979 XB",
        "sentryId": "bJ79X00B",
        "fullname": "(1979 XB)",
        "year_range_min": "2056",
        "year_range_max": "2113",
        "potential_impacts": "2",
        "impact_probability": "7.36e-07",
        "v_infinity": "23.9194972826087",
        "absolute_magnitude": "18.53",
        "estimated_diameter": "0.662",
        "palermo_scale_ave": "-2.82",
        "Palermo_scale_max": "-3.12",
        "torino_scale": "0",
        "last_obs": "1979-Dec-15.42951",
        "last_obs_jd": "2444222.92951",
        "url_nasa_details": "https://cneos.jpl.nasa.gov/sentry/details.html#?des=1979+XB",
        "url_orbital_elements": "http://ssd.jpl.nasa.gov/sbdb.cgi?sstr=3012393;orb=1",
        "is_active_sentry_object": true,
        "average_lunar_distance": 14.2337865829
      },
  }
  </code></pre>
  
  <p>Trying to get that "sentry_objects" variables, testing with "designation", but  i'm just getting errors like:</p>
  
  <pre><code>{
    "errors": [
      {
        "message": "Expected Iterable, but did not find one for field RootQueryType.sentry.",
        "locations": [
          {
            "line": 2,
            "column": 3
          }
        ],
        "path": [
          "sentry"
        ]
      }
    ],
    "data": {
      "sentry": null
    }
  }
  </code></pre>
  
  <p>Thank you for reading :)</p>