@ts-gql/fetch
Advanced tools
Comparing version 0.1.2 to 0.1.3
# @ts-gql/fetch | ||
## 0.1.3 | ||
### Patch Changes | ||
- [`74154ca`](https://github.com/Thinkmill/ts-gql/commit/74154ca7dab4ea3bd03ff5da5105ca770a63afad) Thanks [@emmatown](https://github.com/emmatown)! - Add `exports` field to `package.json` | ||
- Updated dependencies [[`74154ca`](https://github.com/Thinkmill/ts-gql/commit/74154ca7dab4ea3bd03ff5da5105ca770a63afad)]: | ||
- @ts-gql/tag@0.7.1 | ||
## 0.1.2 | ||
@@ -14,3 +23,3 @@ | ||
- [`5b800e7`](https://github.com/Thinkmill/ts-gql/commit/5b800e763cb428c972ff0bfb85592405bb513754) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Republish after broken release | ||
- [`5b800e7`](https://github.com/Thinkmill/ts-gql/commit/5b800e763cb428c972ff0bfb85592405bb513754) Thanks [@emmatown](https://github.com/emmatown)! - Republish after broken release | ||
@@ -21,3 +30,3 @@ ## 0.1.0 | ||
- [`c9356b8`](https://github.com/Thinkmill/ts-gql/commit/c9356b86d05c368409dced5f111d2bbcdf00f586) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Initial release | ||
- [`c9356b8`](https://github.com/Thinkmill/ts-gql/commit/c9356b86d05c368409dced5f111d2bbcdf00f586) Thanks [@emmatown](https://github.com/emmatown)! - Initial release | ||
@@ -24,0 +33,0 @@ ### Patch Changes |
import { OperationVariables, TypedDocumentNode, BaseOperations, OperationData } from "@ts-gql/tag"; | ||
import { GraphQLFormattedError } from "graphql/error/GraphQLError"; | ||
export declare type Fetcher = <TTypedDocumentNode extends TypedDocumentNode<BaseOperations>>(operation: TTypedDocumentNode, ...variables: [OperationVariables<TTypedDocumentNode>] | ({} extends OperationVariables<TTypedDocumentNode> ? [] : never)) => Promise<OperationData<TTypedDocumentNode>>; | ||
export type Fetcher = <TTypedDocumentNode extends TypedDocumentNode<BaseOperations>>(operation: TTypedDocumentNode, ...variables: [OperationVariables<TTypedDocumentNode>] | ({} extends OperationVariables<TTypedDocumentNode> ? [] : never)) => Promise<OperationData<TTypedDocumentNode>>; | ||
export declare function createFetcher(url: string): Fetcher; | ||
@@ -5,0 +5,0 @@ export declare class GraphQLErrorResult extends Error { |
export * from "./declarations/src/index"; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmV0Y2guY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9 |
@@ -20,7 +20,5 @@ 'use strict'; | ||
var _data$errors; | ||
if ((_data$errors = data.errors) === null || _data$errors === void 0 ? void 0 : _data$errors.length) { | ||
if ((_data$errors = data.errors) !== null && _data$errors !== void 0 && _data$errors.length) { | ||
throw new GraphQLErrorResult(data.data, data.errors); | ||
} | ||
return data.data; | ||
@@ -36,3 +34,2 @@ }); | ||
} | ||
} | ||
@@ -39,0 +36,0 @@ |
@@ -20,7 +20,5 @@ 'use strict'; | ||
var _data$errors; | ||
if ((_data$errors = data.errors) === null || _data$errors === void 0 ? void 0 : _data$errors.length) { | ||
if ((_data$errors = data.errors) !== null && _data$errors !== void 0 && _data$errors.length) { | ||
throw new GraphQLErrorResult(data.data, data.errors); | ||
} | ||
return data.data; | ||
@@ -36,3 +34,2 @@ }); | ||
} | ||
} | ||
@@ -39,0 +36,0 @@ |
@@ -16,7 +16,5 @@ import { print } from 'graphql/language/printer'; | ||
var _data$errors; | ||
if ((_data$errors = data.errors) === null || _data$errors === void 0 ? void 0 : _data$errors.length) { | ||
if ((_data$errors = data.errors) !== null && _data$errors !== void 0 && _data$errors.length) { | ||
throw new GraphQLErrorResult(data.data, data.errors); | ||
} | ||
return data.data; | ||
@@ -32,5 +30,4 @@ }); | ||
} | ||
} | ||
export { GraphQLErrorResult, createFetcher }; |
{ | ||
"name": "@ts-gql/fetch", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "dist/fetch.cjs.js", | ||
"module": "dist/fetch.esm.js", | ||
"exports": { | ||
".": { | ||
"module": "./dist/fetch.esm.js", | ||
"default": "./dist/fetch.cjs.js" | ||
}, | ||
"./package.json": "./package.json" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"@ts-gql/tag": "^0.7.0" | ||
"@ts-gql/tag": "^0.7.1" | ||
}, | ||
@@ -10,0 +17,0 @@ "peerDependencies": { |
@@ -15,3 +15,3 @@ # @ts-gql/fetch | ||
const result = await fetchGraphQL(); | ||
const result = await fetchGraphQL({ operation: someQueryOrMutation }); | ||
``` | ||
@@ -18,0 +18,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9783
159
+ Addedgraphql@16.10.0(transitive)
- Removedgraphql@16.9.0(transitive)
Updated@ts-gql/tag@^0.7.1