title: Should I handle a GraphQL ID as a string on the client?
body: <p>I am building an application using:</p>
  
  <ul>
  <li>MySQL as the backend database</li>
  <li>Apollo GraphQL server as a query layer for that database</li>
  <li>Sequelize as the ORM layer between GraphQL and MySQL</li>
  </ul>
  
  <p>As I am building out my GraphQL schema I'm using the GraphQL ID data type to uniquely identify records. Here's an example schema and its MySQL resolver/connector</p>
  
  <p><strong>Graphql Type:</strong></p>
  
  <pre><code>type Person {
    id: ID!
    firstName: String
    middleName: String
    lastName: String
    createdAt: String
    updatedAt: String
  }
  </code></pre>
  
  <p><strong>Sequelize connector</strong></p>
  
  <pre><code>export const Person = sequelize.define('person', {
    firstName: { type: Sequelize.STRING },
    middleName: { type: Sequelize.STRING },
    lastName: { type: Sequelize.STRING },
  });
  </code></pre>
  
  <p><strong>GraphQL resolver:</strong></p>
  
  <pre><code>Query: {
    person(_, args) {
      return Person.findById(args.id);
  }
  </code></pre>
  
  <p>So that all works. Here's my question. GraphQL seems to treat the <code>ID</code> type as a string. While the ID value gets stored in the MySQL database as an <code>INT</code> by Sequelize. I can use GraphQL to query the MySQL db with either a string or a integer that matches the ID value in the database. However, GraphQL will always return the ID value as a string.</p>
  
  <p>How should I be handling this value in the client? Should I always convert it to an integer as soon as I get it from GraphQL? Should I modify my sequelize code to store the ID value as a string? Is there a correct way to proceed when using GraphQL IDs like this?</p>