title: GraphQL Schema for Nested JSON?
body: <p>I am trying to use GraphQL to deal with some JSON data. I can retrieve fields from the top level no problem. I can associate separate JSON objects also no problem. My problems are occurring trying to get at data one level down. So, I have defined a type in my schema for staff. The json looks like this:</p>
  
  <pre><code>"staff": [
   {
     "id": 123,
     "name": "fred",
     "role" : "designer",
     "address": {
       "street": "main street",
       "town": "Springfield"
     }
   },
   ...
  ]
  </code></pre>
  
  <p>and the corresponding type in the schema looks like this so far:</p>
  
  <pre><code>const StaffType = new GraphQLObjectType({
      name: 'Staff',
      fields: {
        id: {type: GraphQLInt},
        name: {type: GraphQLString},
        role: {type: GraphQLString}
      }
  })
  </code></pre>
  
  <p>This works fine as far as retrieving the id, name and role goes. My question is how can I extend <code>StaffType</code> to also retrieve <code>street</code> and <code>town</code> from the <code>address</code> field in the original JSON?</p>
  
  <p>Thanks</p>