Skip to content

Commit

Permalink
Merge pull request #30 from lquixada/master
Browse files Browse the repository at this point in the history
now React Native compatible.
  • Loading branch information
schickling authored Oct 4, 2017
2 parents 86e2647 + 44de8cb commit 471fd33
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"typescript": "^2.4.2"
},
"dependencies": {
"isomorphic-fetch": "^2.2.1"
"cross-fetch": "0.0.8"
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ClientError, Options, Variables } from './types'
export { ClientError } from './types'
import 'isomorphic-fetch'
import 'cross-fetch/polyfill'

export async function request<T extends any> (url: string, query: string, variables?: Variables): Promise<T> {
const client = new GraphQLClient(url)
Expand Down
31 changes: 19 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ ava-init@^0.2.0:
read-pkg-up "^2.0.0"
write-pkg "^2.0.0"

ava@^0.21.0:
version "0.21.0"
resolved "https://registry.yarnpkg.com/ava/-/ava-0.21.0.tgz#cd8d8ea3546f57150dea38548b9f72f8ca583d29"
ava@^0.22.0:
version "0.22.0"
resolved "https://registry.yarnpkg.com/ava/-/ava-0.22.0.tgz#4c28a1fdef7e749ba0c8131ac18a7ca489eef049"
dependencies:
"@ava/babel-preset-stage-4" "^1.1.0"
"@ava/babel-preset-transform-test-files" "^3.0.0"
Expand Down Expand Up @@ -879,6 +879,13 @@ create-error-class@^3.0.0:
dependencies:
capture-stack-trace "^1.0.0"

cross-fetch@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-0.0.8.tgz#01ed94dc407df2c00f1807fde700a7cfa48a205c"
dependencies:
node-fetch "1.7.3"
whatwg-fetch "2.0.3"

cross-spawn-async@^2.1.1:
version "2.2.5"
resolved "https://registry.yarnpkg.com/cross-spawn-async/-/cross-spawn-async-2.2.5.tgz#845ff0c0834a3ded9d160daca6d390906bb288cc"
Expand Down Expand Up @@ -1600,13 +1607,6 @@ isobject@^2.0.0:
dependencies:
isarray "1.0.0"

isomorphic-fetch@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
dependencies:
node-fetch "^1.0.1"
whatwg-fetch ">=0.10.0"

isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
Expand Down Expand Up @@ -1899,7 +1899,14 @@ nan@^2.3.0:
version "2.6.2"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"

node-fetch@^1.0.1, node-fetch@^1.3.3:
node-fetch@1.7.3:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
dependencies:
encoding "^0.1.11"
is-stream "^1.0.1"

node-fetch@^1.3.3:
version "1.7.0"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.0.tgz#3ff6c56544f9b7fb00682338bb55ee6f54a8a0ef"
dependencies:
Expand Down Expand Up @@ -2818,7 +2825,7 @@ well-known-symbols@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/well-known-symbols/-/well-known-symbols-1.0.0.tgz#73c78ae81a7726a8fa598e2880801c8b16225518"

whatwg-fetch@>=0.10.0:
whatwg-fetch@2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84"

Expand Down

0 comments on commit 471fd33

Please sign in to comment.