apollographql / react-apollo

:recycle: React integration for Apollo Client
https://www.apollographql.com/docs/react/
MIT License
6.85k stars 787 forks source link

React apollo 3.0.1 issue,during calling github graphql api calling #3427

Closed amitKumar56 closed 5 years ago

amitKumar56 commented 5 years ago

Intended outcome:

It is my first work with react Apollo graph-ql. no i am trying to call GitHub graph-al API for getting my profile details .it show me error. Type Error: Object(...) is not a function useBaseQuery D:/Amit/Projects/GraphQl/ApolloGraphQlReact/node_modules/@apollo/react-hooks/lib/react-hooks.esm.js:430 427 | lazy = false; 428 | } 429 |

430 | var context = useContext(getApolloContext()); | ^ 431 | 432 | var _a = useReducer(function (x) { 433 | return x + 1; you were trying to accomplish when the bug occurred, and as much code as possible related to the source of the problem.

its work fine in ^2.2.4 react-apollo version the issue in ^3.0.1 my current version of react-apollo

Actual outcome:

is should display my profile details

Version

hwillson commented 5 years ago

@amitKumar56 This doesn't look like a React Apollo issue. I'd double check your react and react-dom dependencies, to make sure they're ^16.8.0.