@caido/sdk-frontend 0.57.1-beta.7 → 0.57.1-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caido/sdk-frontend",
3
- "version": "0.57.1-beta.7",
3
+ "version": "0.57.1-beta.8",
4
4
  "description": "Typing for the Caido Frontend SDK",
5
5
  "author": "Caido Labs Inc. <dev@caido.io>",
6
6
  "repository": "https://github.com/caido/sdk-js/",
@@ -39,6 +39,23 @@ import type { WorkflowSDK } from "./workflows";
39
39
  export type API<T extends BackendEndpoints | BackendSpec = Record<string, never>, E extends BackendEvents = Record<string, never>> = {
40
40
  /**
41
41
  * Utilities to interact with the GraphQL API.
42
+ *
43
+ * Queries and mutations return a promise; subscriptions return an
44
+ * `AsyncIterable`. On success they resolve with the response data or yield
45
+ * it. On failure (network error or any GraphQL errors returned by the
46
+ * server) the promise rejects, or the iterator throws into the `for await`
47
+ * loop, with the underlying error. Failures can be handled with `try`/
48
+ * `catch` or `.catch()`.
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * try {
53
+ * const result = await sdk.graphql.automateEntry({ id: "1" });
54
+ * // use result
55
+ * } catch (err) {
56
+ * // err.message, err.graphQLErrors, err.networkError
57
+ * }
58
+ * ```
42
59
  */
43
60
  graphql: GraphqlSDK;
44
61
  /**