title: Sorting in GraphQL by ID
body: <p>I downloaded one simple tutorial code.
  But as I am playing with it I couldn't figure out how can I sort for example by id in graphql.</p>
  
  <p>This is query.js</p>
  
  <pre><code>import React from "react";
  import { useQuery } from "@apollo/react-hooks";
  
  const Query = ({ children, query, id }) =&gt; {
    console.log(id);
    const { data, loading, error } = useQuery(query, {
      variables: { id: parseInt(id) }
    });
  
    if (loading) return &lt;p&gt;Loading...&lt;/p&gt;;
    if (error) return &lt;p&gt;Error: {JSON.stringify(error)}&lt;/p&gt;;
    return children({ data });
  };
  
  export default Query;
  </code></pre>
  
  <p>Articles.js</p>
  
  <pre><code>    import gql from "graphql-tag";
  
      const ARTICLES_QUERY = gql`
  
    query Articles {
      articles(limit: 10) {
        id
        title
        category {
          id
          name
        }
        Image
      }
    }
  `;
  
  export default ARTICLES_QUERY;
  </code></pre>
  
  <p>And then calling it using one componnent.</p>
  
  <pre><code>  &lt;Query query={ARTICLES_QUERY}&gt;
      {({ data: { articles } }) =&gt; {
        return &lt;Articles articles={articles} /&gt;;
      }}
    &lt;/Query&gt;
  </code></pre>
  
  <p>I was able to limit number of results to 10 as you can see in code <code>articles(limit: 10)</code> but i cant figure out how can i see only last 10 items. (now its first 10). Thank for any help.</p>