title: useQuery returns undefined, But returns data on gql playground
body: <pre><code>"@apollo/react-hooks": "^3.1.3",
  "apollo-client": "^2.6.8",
  </code></pre>
  
  <p>Apollo client return undefined on react app but return the data on gql playground, I don't understand why don't it works on client-side but works on graphql playground.</p>
  
  <p><strong>Schema</strong></p>
  
  <p>I have defined union for user query for error handling.</p>
  
  <pre><code>type Query {
    user(id: ID!): UserReturn!
  }
  
  union UserReturn = User | Error
  
  type User {
    id: ID!
    username: String!
    email: String
    profileUrl: String
    createdAt: Date
    ads: [Doc!]!
  }
  
  
  type Error {
    message: String
    code: ID
  }
  </code></pre>
  
  <p><strong>Query resolver</strong></p>
  
  <pre><code> async user(_, { id }, { User }) {
      console.log('query - User')
      try {
        await delay(1000 * 3)
        const user = await User.findById(id).populate('userData')
        console.log(user)
        if (!user) return {
          __typename: 'Error',
          message: 'User not found.',
          code: id
        }
  
        const { _id: id, username, email, createdAt, userData: { profileUrl } } = user
  
        console.log(username)
        return {
          __typename: 'User',
          id,
          username,
          email,
          createdAt,
          profileUrl
        }
      } catch (err) {
        console.log(err)
        return {
          __typename: 'Error',
          message: 'Something went wrong while getting user.',
          code: LogBack(err, `query/user?id=${id}`, __filename)
        }
      }
    }
  </code></pre>
  
  <p><strong>When querying on gql playground</strong></p>
  
  <p>on graphql playground, query works.</p>
  
  <p><img src="https://user-images.githubusercontent.com/42825498/73125426-c806f980-3fcc-11ea-9a33-803b4e71e323.jpg" alt="Screenshot from 2020-01-25 23-44-01_censored"></p>
  
  <p><strong>On the client-side</strong></p>
  
  <pre><code> const { data } = useQuery(
      gql`query user($id: ID!) {
        user(id: $id) {
          __typename
          ... on User {
            id
            username
            email
            profileUrl
            createdAt
            # ads
          }
          ... on Error {
            message
            code
          }
        }
      }
      `,
      {
        variables: {
          id: userId
        }
      }
    );
  
    console.log(data) // undefined
  </code></pre>
  
  <p>useQuery runs but returns undefiend.</p>