title: "The variables input contains a field name 'userID' that is not defined for input object type 'CreateOrderInput'
body: <p>I've been stuck with this problem in my graphQL API, and I don't know how to unsolved it.</p>
  <p>schema.graphQL:</p>
  <pre><code>type User @model {
    id: ID!
    username: String!
    email: String!
  
    orders: [Order] @connection(keyName: &quot;byUser&quot;, fields: [&quot;id&quot;])
  }
  
  type Car @model {
    id: ID!
    type: String!
    latitude: Float,
    longitude: Float,
    heading: Float,
    isActive: Boolean
  
    orders: [Order] @connection(keyName: &quot;byCar&quot;, fields: [&quot;id&quot;])
  }
  
  type Order @model
    @key(name: &quot;byUser&quot;, fields: [&quot;userId&quot;])
    @key(name: &quot;byCar&quot;, fields: [&quot;carId&quot;, &quot;createAt&quot;]) {
    id:ID!
    createAt: ID!
  
    type: String!
  
    originLatitude: Float!
    originLongitude: Float!
  
    destLatitude: Float!
    destLongitude: Float!
  
    userId: ID! // I think theres something wrong at here.
    user: User @connection(fields: [&quot;userId&quot;])
  
    carId: ID!
    car: Car @connection(fields: [&quot;carId&quot;])
  }
  </code></pre>
  <p>Mutations.js (Generated by AWS):</p>
  <pre><code>export const createOrder = /* GraphQL */ `
    mutation CreateOrder(
      $input: CreateOrderInput!
      $condition: ModelOrderConditionInput
    ) {
      createOrder(input: $input, condition: $condition) {
        id
        createAt
        type
        originLatitude
        originLongitude
        destLatitude
        destLongitude
        userId
        user {
          id
          username
          email
          orders {
            nextToken
          }
          createdAt
          updatedAt
        }
        carId
        car {
          id
          type
          latitude
          longitude
          heading
          isActive
          orders {
            nextToken
          }
          createdAt
          updatedAt
        }
        createdAt
        updatedAt
      }
    }
  `;
  </code></pre>
  <p>code:</p>
  <pre><code>    // submit to server
          try {
              const userInfo = await Auth.currentAuthenticatedUser();
  
              const date = new Date();
              const input = {
                  createAt: date.toISOString(),
                  type,
                  originLatitude: originPlace.details.geometry.location.lat || 0,
                  originLongitude: originPlace.details.geometry.location.lng || 0,
  
                  destLatitude: destinationPlace.details.geometry.location.lat || 0,
                  destLongitude: destinationPlace.details.geometry.location.lng || 0,
                  
                  userID: userInfo.attributes.sub,
                  carID: &quot;1&quot;,
              }
  
              const response = await API.graphql (
                  graphqlOperation (
                      createOrder, {
                          input: input
                      },
                  )
              )
  
              console.log(response);
              Alert.alert (
                  &quot;Order has been submitted successful!!!&quot;,
                  [{
                      text: &quot;Go home&quot;,
                      onPress: () =&gt; navigation.navigate('HomeScreen')
                  }]
              )
          } catch (e) {
              console.error(e);
          }
      }
  </code></pre>
  <p>when I try to submit it to the server it gave me an error.</p>
  <blockquote>
  <p>{&quot;data&quot;: null, &quot;errors&quot;: [{&quot;locations&quot;: null, &quot;message&quot;: &quot;The
  variables input contains a field name 'userID' that is not defined for
  input object type 'CreateOrderInput' &quot;, &quot;path&quot;: null}]}</p>
  </blockquote>