Batch Write mutation with AWS AppSync

I am using AWS AppSync and i’d like to write a mutation for batch writing.
As you can see in the code snippet i’m passing down an array which i want to batch write to DynamoDB.
this mutation is working perfectly when done from the AWS Query dashboard.
But when i try running this using React Native apollo client (as mentioned in the AWS Docs) the input is always null.

export const createBatchMutation = gql`
  mutation CreateBatchData($items: [CreateDataInput!]) {
   createBatchData(input: $items) {
     value
     dataID
     createdAt
     updatedAt
     recordedAt
   }
 }
`;