Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .azure-devops/graphitation-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pr: none
trigger:
- main
- alloy/relay-apollo-duct-tape
- jvejr/supermassive-hooks-error-handling-alpha-release

variables:
- group: InfoSec-SecurityResults
Expand Down
2 changes: 1 addition & 1 deletion examples/apollo-watch-fragments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"devDependencies": {
"@graphitation/apollo-react-relay-duct-tape-compiler": "^1.6.11",
"@graphitation/embedded-document-artefact-loader": "^0.8.5",
"@graphitation/supermassive": "^3.7.2",
"@graphitation/supermassive": "^3.8.0-alpha.4",
"@graphql-codegen/cli": "2.2.0",
"@graphql-codegen/typescript": "2.2.2",
"@graphql-codegen/typescript-resolvers": "^2.2.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/supermassive-todomvc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@graphitation/apollo-react-relay-duct-tape": "^1.3.13",
"@graphitation/apollo-react-relay-duct-tape-compiler": "^1.6.11",
"@graphitation/graphql-js-tag": "^0.9.4",
"@graphitation/supermassive": "^3.7.2",
"@graphitation/supermassive": "^3.8.0-alpha.4",
"@graphitation/ts-transform-graphql-js-tag": "^1.4.4",
"concurrently": "^6.5.1",
"graphql": "^15.6.1",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"lint": "lage lint --continue",
"lage": "lage",
"ci": "yarn lage build types test lint && yarn checkchange",
"beachball": "beachball -b origin/main",
"beachball": "beachball -b origin/jvejr/supermassive-hooks-error-handling-alpha-release",
"change": "yarn beachball change",
"checkchange": "yarn beachball check",
"release": "yarn beachball publish -t latest",
"release": "yarn beachball publish -t alpha",
"postinstall": "patch-package"
},
"devDependencies": {
Expand Down
15 changes: 15 additions & 0 deletions packages/apollo-react-relay-duct-tape-compiler/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@graphitation/apollo-react-relay-duct-tape-compiler",
"entries": [
{
"date": "Wed, 25 Dec 2024 21:18:59 GMT",
"version": "1.6.11",
"tag": "@graphitation/apollo-react-relay-duct-tape-compiler_v1.6.11",
"comments": {
"none": [
{
"author": "beachball",
"package": "@graphitation/apollo-react-relay-duct-tape-compiler",
"comment": "Bump @graphitation/supermassive to v3.8.0-alpha.4",
"commit": "not available"
}
]
}
},
{
"date": "Mon, 16 Dec 2024 15:39:40 GMT",
"version": "1.6.11",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"peerDependencies": {
"graphql": "^15.0.0",
"@graphitation/supermassive": "^3.7.2",
"@graphitation/supermassive": "^3.8.0-alpha.4",
"typescript": "^5.5.3"
},
"publishConfig": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@graphitation/graphql-codegen-supermassive-schema-extraction-plugin",
"entries": [
{
"date": "Wed, 25 Dec 2024 21:18:59 GMT",
"version": "2.0.19",
"tag": "@graphitation/graphql-codegen-supermassive-schema-extraction-plugin_v2.0.19",
"comments": {
"none": [
{
"author": "beachball",
"package": "@graphitation/graphql-codegen-supermassive-schema-extraction-plugin",
"comment": "Bump @graphitation/supermassive to v3.8.0-alpha.4",
"commit": "not available"
}
]
}
},
{
"date": "Mon, 16 Dec 2024 15:39:40 GMT",
"version": "2.0.19",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@graphql-codegen/plugin-helpers": ">= 1.18.0 < 2"
},
"dependencies": {
"@graphitation/supermassive": "^3.7.2",
"@graphitation/supermassive": "^3.8.0-alpha.4",
"graphql": "^15.0.0"
},
"sideEffects": false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@graphitation/graphql-codegen-supermassive-typed-document-node-plugin",
"entries": [
{
"date": "Wed, 25 Dec 2024 21:18:59 GMT",
"version": "1.0.12",
"tag": "@graphitation/graphql-codegen-supermassive-typed-document-node-plugin_v1.0.12",
"comments": {
"none": [
{
"author": "beachball",
"package": "@graphitation/graphql-codegen-supermassive-typed-document-node-plugin",
"comment": "Bump @graphitation/supermassive to v3.8.0-alpha.4",
"commit": "not available"
}
]
}
},
{
"date": "Mon, 16 Dec 2024 15:39:40 GMT",
"version": "1.0.12",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@graphql-codegen/visitor-plugin-common": ">= ^1.17.0 < 2",
"graphql-tag": ">= 2.11.0 < 3",
"@graphql-tools/optimize": "^1.0.1",
"@graphitation/supermassive": "^3.7.2"
"@graphitation/supermassive": "^3.8.0-alpha.4"
},
"sideEffects": false,
"access": "public",
Expand Down
15 changes: 15 additions & 0 deletions packages/supermassive/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
{
"name": "@graphitation/supermassive",
"entries": [
{
"date": "Wed, 25 Dec 2024 21:18:59 GMT",
"version": "3.8.0-alpha.4",
"tag": "@graphitation/supermassive_v3.8.0-alpha.4",
"comments": {
"prerelease": [
{
"author": "[email protected]",
"package": "@graphitation/supermassive",
"commit": "24097ac60df4238a0e6c7fbd549f63384e196770",
"comment": "Supermassive PR comment fixes"
}
]
}
},
{
"date": "Mon, 16 Dec 2024 15:39:40 GMT",
"version": "3.7.2",
Expand Down
10 changes: 9 additions & 1 deletion packages/supermassive/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Change Log - @graphitation/supermassive

<!-- This log was last generated on Mon, 16 Dec 2024 15:39:40 GMT and should not be manually modified. -->
<!-- This log was last generated on Wed, 25 Dec 2024 21:18:59 GMT and should not be manually modified. -->

<!-- Start content -->

## 3.8.0-alpha.4

Wed, 25 Dec 2024 21:18:59 GMT

### Changes

- Supermassive PR comment fixes ([email protected])

## 3.7.2

Mon, 16 Dec 2024 15:39:40 GMT
Expand Down
64 changes: 64 additions & 0 deletions packages/supermassive/hooks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Hooks Documentation

## Overview

This document describes the behaviour of hooks when they encounter errors.

## General Rule

- **Thrown Error**: Specific behaviour is applied based on the hook.
- **Returned Error**: The error is registered and execution continues.

### Hooks and Their Behaviours

#### `beforeOperationExecute`

Called before every operation

- **Thrown Error**: Stops execution and sets `data` to `null` and registers the error.
- **Returned Error**: The error is registered and execution continues.

#### `beforeSubscriptionEventEmit`

- **Thrown ErErrorror**: Sets `data` to `null` and registers the error.
- **Returned Error**: The error is registered and execution continues.

#### `beforeFieldResolve`

Called before every field resolution

- **Thrown Error**: The field is not executed and is handled as if it has returned `null`.
- **Returned Error**: The error is registered and execution continues.

#### `afterFieldResolve`

Called after every field resolution.

- **Thrown Error**: The field is set to `null` and the error is registered.
- **Returned Error**: The error is registered and execution continues.

#### `afterFieldComplete`

Called when field value is completed

- **Thrown Error**: The field is set to `null` and the error is registered.
- **Returned Error**: The error is registered and execution continues.

#### `afterBuildResponse`

- **Thrown Error**: Returns no data property, only errors.
- **Returned Error**: The error is registered and execution continues.

## Additional Hooks

### `beforeFieldSubscribe`

Called before subscription event stream creation

- **Thrown or Returned Error**: Stops execution and sets `data` is `undefined` and error is returned in `errors` field.

### `afterFieldSubscribe`

Called after subscription event stream creation

- **Thrown or Returned Error**: Stops execution and sets `data` is `undefined` and error is returned in `errors` field.
2 changes: 1 addition & 1 deletion packages/supermassive/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@graphitation/supermassive",
"license": "MIT",
"version": "3.7.2",
"version": "3.8.0-alpha.4",
"main": "./src/index.ts",
"repository": {
"type": "git",
Expand Down
Loading
Loading