title: How to fix 'Variable "$_v0_data" got invalid value' caused from data types relation - Mutation Resolver
body: <p>I am trying to setup relations between types and wrote a resolver to run a mutation that create the list values but getting the below error</p>
  
  <p>here is my mutation file </p>
  
  <pre><code>  async createList(parent, args, ctx, info) {
      const list = await ctx.db.mutation.createList(
        {
          data: {
            project: {
              connect: {
                id: args.projectId
              }
            },
            ...args
          }
        },
        info
      );
      return list;
    }
  </code></pre>
  
  <p>and here is my datamodel </p>
  
  <pre><code>type Board {
    id: ID! @id
    title: String!
    createdAt: DateTime! @createdAt
    updatedAt: DateTime! @updatedAt
    lists: [List]!
  }
  
  type List {
    id: ID! @id
    title: String!
    createdAt: DateTime! @createdAt
    updatedAt: DateTime! @updatedAt
    project: Board!
  }
  </code></pre>
  
  <p>and my schema is </p>
  
  <pre><code>type Mutation {
    createList(title: String!, projectId: ID!): List!
  }
  </code></pre>
  
  <p>and the generated prisma file </p>
  
  <pre><code>type Mutation {
    createList(data: ListCreateInput!): List!
  }
  
  input ListCreateInput {
    id: ID
    title: String!
    project: BoardCreateOneWithoutListsInput!
  }
  
  </code></pre>
  
  <p>I expected this mutation to run and create the values but got this error instead </p>
  
  <pre><code>Error: Variable "$_v0_data" got invalid value { project: { connect: [Object] }, title: "to do", projectId: "cjyey7947hh6x0b36m231qhbc" }; Field "projectId" is not defined by type ListCreateInput. Did you mean project?
      at new CombinedError (/Users/gabroun/Documents/Sites/react-kanban/server/node_modules/graphql-tools/dist/stitching/errors.js:82:28)
      at Object.checkResultAndHandleErrors (/Users/gabroun/Documents/Sites/react-kanban/server/node_modules/graphql-tools/dist/stitching/errors.js:98:15)
      at CheckResultAndHandleErrors.transformResult (/Users/gabroun/Documents/Sites/react-kanban/server/node_modules/graphql-tools/dist/transforms/CheckResultAndHandleErrors.js:9:25)
      at /Users/gabroun/Documents/Sites/react-kanban/server/node_modules/graphql-tools/dist/transforms/transforms.js:18:54
      at Array.reduce (&lt;anonymous&gt;)
      at applyResultTransforms (/Users/gabroun/Documents/Sites/react-kanban/server/node_modules/graphql-tools/dist/transforms/transforms.js:17:23)
      at /Users/gabroun/Documents/Sites/react-kanban/server/node_modules/graphql-tools/dist/stitching/delegateToSchema.js:97:50
      at step (/Users/gabroun/Documents/Sites/react-kanban/server/node_modules/graphql-tools/dist/stitching/delegateToSchema.js:31:23)
      at Object.next (/Users/gabroun/Documents/Sites/react-kanban/server/node_modules/graphql-tools/dist/stitching/delegateToSchema.js:12:53)
      at fulfilled (/Users/gabroun/Documents/Sites/react-kanban/server/node_modules/graphql-tools/dist/stitching/delegateToSchema.js:3:58)
  </code></pre>