title: graphql-go : Use an Object as Input Argument to a Query
body: <p>I'm attempting to pass an object as an argument to a query (rather than a scalar). From the docs it seems that this should be possible, but I can't figure out how to make it work.</p>
  
  <p>I'm using graphql-go, here is the test schema:</p>
  
  <pre><code>var fileDocumentType = graphql.NewObject(graphql.ObjectConfig{
  Name: "FileDocument",
  Fields: graphql.Fields{
      "id": &amp;graphql.Field{
          Type: graphql.String,
          Resolve: func(p graphql.ResolveParams) (interface{}, error) {
              if fileDoc, ok := p.Source.(data_format.FileDocument); ok {
                  return fileDoc.Id, nil
              }
              return "", nil
          },
      },
      "tags": &amp;graphql.Field{
          Type: graphql.NewList(tagsDataType),
          Args: graphql.FieldConfigArgument{
              "tags": &amp;graphql.ArgumentConfig{
                  Type: tagsInputType,
              },
          },
          Resolve: func(p graphql.ResolveParams) (interface{}, error) {
              fmt.Println(p.Source)
              fmt.Println(p.Args)
              if fileDoc, ok := p.Source.(data_format.FileDocument); ok {
                  return fileDoc.Tags, nil
              }
              return nil, nil
          },
      },
  
  },
  })
  </code></pre>
  
  <p>And the inputtype I'm attempting to use (I've tried both an InputObject and a standard Object)</p>
  
  <pre><code>var tagsInputType = graphql.NewInputObject(graphql.InputObjectConfig{
  Name: "tagsInput",
  Fields: graphql.Fields{
      "keyt": &amp;graphql.Field{
          Type: graphql.String,
      },
      "valuet": &amp;graphql.Field{
          Type: graphql.String,
      },
  },
  })
  </code></pre>
  
  <p>And here is the graphql query I'm using to test:</p>
  
  <pre><code>{
          list(location:"blah",rule:"blah")
          {
              id,tags(tags:{keyt:"test",valuet:"test"})
              {
                  key,
                  value
              },
              {
                  datacentre,
                  handlerData
                  {
                      key,
                      value
                  }
              }
          }
      }
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <pre><code>wrong result, unexpected errors: [Argument "tags" has invalid value {keyt: "test", valuet: "test"}.
  In field "keyt": Unknown field.
  In field "valuet": Unknown field.]
  </code></pre>
  
  <p>The thing is, when I change the type to a string, it works fine. How do I use an object as an input arg?</p>
  
  <p>Thanks!</p>