title: Handling response from GraphQL API with axios
body: <p>I can successfully make the post request I want to like this:</p>
  <pre><code>async function fn(): Promise&lt;MediaListCollection&gt; {
    let result = {} as MediaListCollection;
  
    await axios
      .post&lt;MediaListCollection&gt;(
        &quot;https://graphql.anilist.co/&quot;,
        {
          query: USER_LIST_CURRENT,
          variables: {
            userId: 831347,
            status: MediaListStatus.Current,
            type: MediaType.Anime,
          },
        },
        {
          headers: {
            &quot;Content-Type&quot;: &quot;application/json&quot;,
            Accept: &quot;application/json&quot;,
          },
        }
      )
      .then((response) =&gt; (result = response.data))
      .catch((err) =&gt; {
        throw {
          error: err,
        };
      });
  
    return result;
  }
  
  fn()
    .then((data) =&gt; console.log(JSON.stringify(data)))
    .catch((err) =&gt; console.log(JSON.stringify(err)));
  </code></pre>
  <p>But the output ends up being:</p>
  <pre><code>{&quot;data&quot;:{&quot;MediaListCollection&quot;:{&quot;lists&quot;:[{&quot;name&quot;:&quot;Watching&quot;,&quot;entries&quot;:[{&quot;id&quot;:158643971,&quot;mediaId&quot;:5081,&quot;status&quot;:&quot;CURRENT&quot;,&quot;score&quot;:0,&quot;progress&quot;:10,&quot;repeat&quot;:0,&quot;media&quot;:{&quot;title&quot;:{&quot;userPreferred&quot;:&quot;Bakemonogatari&quot;},&quot;coverImage&quot;:{&quot;extraLarge&quot;:&quot;https://s4.anilist.co/file/anilistcdn/media/anime/cover/large/bx5081-YpAE43HLQKqz.png&quot;},&quot;format&quot;:&quot;TV&quot;,&quot;status&quot;:&quot;FINISHED&quot;,&quot;episodes&quot;:15,&quot;averageScore&quot;:83,&quot;isAdult&quot;:false,&quot;genres&quot;:[&quot;Comedy&quot;,&quot;Drama&quot;,&quot;Mystery&quot;,&quot;Psychological&quot;,&quot;Romance&quot;,&quot;Supernatural&quot;],&quot;bannerImage&quot;:&quot;https://s4.anilist.co/file/anilistcdn/media/anime/banner/n5081-0Zcn5GOFYHMc.jpg&quot;,&quot;startDate&quot;:{&quot;year&quot;:2009,&quot;month&quot;:7,&quot;day&quot;:3}}}]}]}}}
  </code></pre>
  <p>And so I try to access the entry list 0:</p>
  <pre><code>fn()
    .then((data) =&gt; console.log(JSON.stringify(data.lists![0])))
    .catch((err) =&gt; console.log(JSON.stringify(err)));
  </code></pre>
  <p>I get</p>
  <pre><code>{}
  </code></pre>
  <p>I see that the response has a bigger object, &quot;data&quot;, is there any way to overcome this? I don't think I need to go over every type and add it, or do I?</p>