GraphQL object property should be a list of strings
<p>How do I make a schema for an object property that is an array of strings in GraphQL?  I want the response to look like this:</p>

<pre><code>{
  name: "colors",
  keys: ["red", "blue"]
}
</code></pre>

<p>Here is my Schema</p>

<pre><code>var keysType = new graphql.GraphQLObjectType({
  name: 'keys',
  fields: function() {
    key: { type: graphql.GraphQLString }
  }
});

var ColorType = new graphql.GraphQLObjectType({
  name: 'colors',
  fields: function() {
    return {
      name: { type: graphql.GraphQLString },
      keys: { type: new graphql.GraphQLList(keysType)
    };
  }
});
</code></pre>

<p>When I run this query I get an error and no data, the error is just <code>[{}]</code> </p>

<p><em>query { colors { name, keys } }</em></p>

<p>However when I run a query to return just the name I get a successful response. </p>

<p><em>query { colors { name } }</em></p>

<p>How do I create a schema that returns an array of strings for when I query for keys?</p>