Skip to content

Commit

Permalink
Changed Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ahincalan authored and ahincalan committed Jan 28, 2019
1 parent 7bce4d3 commit 1a5ccae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gql-api-client",
"version": "0.0.8",
"version": "0.0.7",
"description": "Graphql Client Library",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -34,9 +34,6 @@
"bugs": {
"url": "https://github.com/ahincalan/gql-api-client/issues"
},
"entry": [
"whatwg-fetch"
],
"homepage": "https://github.com/ahincalan/gql-api-client#readme",
"devDependencies": {
"@types/chai": "^4.1.7",
Expand All @@ -56,7 +53,7 @@
"typescript": "^3.2.4"
},
"dependencies": {
"@types/whatwg-fetch": "0.0.33",
"whatwg-fetch": "^3.0.0"
"@types/node-fetch": "^2.1.4",
"node-fetch": "^2.3.0"
}
}
6 changes: 3 additions & 3 deletions src/lib/GqlClient.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {GqlOptions} from "../types/options";
import "whatwg-fetch";
import fetch from "node-fetch";

export class GqlClient {

Expand Down Expand Up @@ -99,7 +99,7 @@ export class GqlClient {
headers: headers
};

return fetch(this.url, fb).then(async (response: any) => {
return fetch(this.url, fb).then(async response => {
return {
...await response.json(),
...{
Expand All @@ -108,7 +108,7 @@ export class GqlClient {
headers: response.headers
}
};
}).then((res: any) => {
}).then(res => {
return res;
});
}
Expand Down
3 changes: 0 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
"outDir": "dist",
"lib": [
"es2015"
],
"types": [
"whatwg-fetch"
]
/* "target": "es5",
"module": "commonjs",
Expand Down

0 comments on commit 1a5ccae

Please sign in to comment.