title: passed to parser was not a valid GraphQL DocumentNode.you may need to use 'graphql-tag' or another method to convert your operation into a document
body: <p>Iam new to react-native,graphql and Aws AppSync . We tried to build an react-native app using the aws appsync.When i run <strong>react-native run-android</strong> it is throwing an error saying</p>
  
  <blockquote>
    <p>passed to parser was not a valid GraphQL DocumentNode.you may need to use 'graphql-tag' or another method to convert your operation into a document</p>
  </blockquote>
  
  <p>Please do have a look at the  </p>
  
  <blockquote>
    <p><a href="https://i.stack.imgur.com/hr5fA.jpg" rel="noreferrer">https://i.stack.imgur.com/hr5fA.jpg</a></p>
  </blockquote>
  
  <p>image url to get the reference.</p>
  
  <pre><code> import { graphql, compose } from 'react-apollo';
  import gql from 'graphql-tag';
  
   const listMessages = graphql(gql`
      query listMessages {
        listMessages {
          id
          text
          createdAt
          sentBy {
            id
            name
          }
        }
      }`)
    const createMessage = graphql(gql`
    mutation createMessage($text: String!, $sentById: ID!) {
        createMessage(input : {
          id : $sentById
          text : $text
          createdAt : "1/06/2018"
          updateAt:"1/06/2018"
        }){
         sentBy {
           id
           name
        }
        }
       }`)
  
  
       export default compose(
          graphql(createMessage,{
            options: {
              fetchPolicy: 'cache-and-network'
            }
          }, {name : 'createMessageMutation'}),
          graphql(listMessages, {
            options : {
              fetchPolicy: 'cache-and-network'
            }
          }, {name: 'listMessagesQuery'})
        )(Chat)
  </code></pre>
  
  <p>The above code is the basic implementation of graphql.</p>
  
  <p>I can't really trace out the error Please Help me.Thanks! in advance</p>