title: strapi graphql plugin: how to get all records
body: <h3>Intent:</h3>
  
  <p>I need graphql to return all records</p>
  
  <h3>Issue:</h3>
  
  <p><code>amountLimit</code> is implemented differently on the strapi plugin</p>
  
  <h3>Question:</h3>
  
  <p>Can somebody tell me why graphql <code>amountLimit</code> was implemented like this?</p>
  
  <pre class="lang-js prettyprint-override"><code>  amountLimiting: (params = {}) =&gt; {
      const { amountLimit } = strapi.plugins.graphql.config;
      if(!amountLimit) return params;
      if (!params.limit || params.limit === -1 || params.limit &gt; amountLimit) {
        params.limit = amountLimit;
      } else if (params.limit &lt; 0) {
        params.limit = 0;
      } 
      return params;
    },
  </code></pre>
  
  <h3>Explanation:</h3>
  
  <p>strapi has a <code>_limit = 0</code> for all records, but on graphql plugin they're adding a default limit of 100.
  If I am to give <code>limit: -1</code> or <code>limit: 0</code> to the graphql query, it will put the default <code>limit</code> of <code>100</code>.
  If I am to give (<code>else if (params.limit &lt; 0)</code>)  any other <code>nr</code> lower than <code>0</code>, but it's not <code>-1</code>, the plugin queries strapi with <code>limit: 0</code> (all records)</p>
  
  <h3>Workaround</h3>
  
  <p>I need a way of querying graphql for all records, yet setting the limit to <code>-2</code> seems a bit random to me (as setting the limit to any <code>-(2^31) &lt; nr &lt; -1</code> number) </p>
  
  <h3>Solution !?</h3>
  
  <p>Any thoughts?</p>