kadirahq / lokka

Simple JavaScript Client for GraphQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lokka seems to be incompatible with React Native

callmephilip opened this issue · comments

I am running into issues trying to get Lokka to work in React Native. Looks like it's due to some of the deps that node-fetch has (notably url, http)

@callmephilip if you downgrade it to a previous version it will work. I'm using this in the latest RN:

"lokka": "^1.7.0",
"lokka-transport-http": "1.3.2",

@AdamBrodzinski : yup. ended up doing just that. still felt like reporting this though

@AdamBrodzinski not work.
Still error now.

Unable to resolve module url from /Users/jointsong/Documents/project/project/React/node_modules/node-fetch/index.js: Unable to find this module in its module map or any of the node_modules directories under /Users/node_modules/url and its parent directories

ReactNative 0.29
Node 4.2.0
npm 3.9.5

@joint-song node-fetch could have changed with the new react native... i think i remember there being some kind of change with the fetch pollyfill on the changelog. Might be worth checking out there.

I've moved on to using Apollo with the core API to swap out lokka since it's not being maintained and mutation variables are not working. Plus apollo-client has the react binding which can be nice too.

@AdamBrodzinski OK.I'm trying Apollo.Thank you:)