Skip to content

Commit e74722d

Browse files
capajDimitri POSTOLOVkamilkisielagithub-actions[bot]
authored
feat: Teams communication adapter (#4968)
Co-authored-by: Dimitri POSTOLOV <[email protected]> Co-authored-by: Kamil Kisiela <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent eec6c9c commit e74722d

File tree

33 files changed

+731
-476
lines changed

33 files changed

+731
-476
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ packages/web/app/environment-*.mjs
130130
packages/web/app/src/gql/*.ts
131131
packages/web/app/src/gql/*.json
132132
packages/web/app/src/graphql/*.ts
133+
packages/web/docs/public/feed.xml
133134
# Changelog
134135
packages/web/app/src/components/ui/changelog/generated-changelog.ts
135136

@@ -142,6 +143,4 @@ deployment/utils/contour.types.ts
142143
schema.graphql
143144
resolvers.generated.ts
144145

145-
# generated by tsup
146-
configs/tsup/dev.config.*.mjs
147-
packages/web/docs/public/feed.xml
146+
docker/docker-compose.override.yml

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
<!-- Graphql logo readme banner START -->
2+
<p style="float: right; margin: 0 0 10px 10px;">
3+
<a href="https://the-guild.dev">
4+
<img src="https://the-guild-org.github.io/press-kit/full-dark-logo.svg" alt="Created by The guild" style="width: 100px;"/>
5+
</a>
6+
</p>
7+
<!-- Graphql logo readme banner END -->
8+
19
# GraphQL Hive
210

311
GraphQL Hive provides all the tools the get visibility of your GraphQL architecture at all stages,
@@ -51,10 +59,11 @@ GraphQL Hive helps you get a global overview of the usage of your GraphQL API wi
5159

5260
### Integrations
5361

54-
GraphQL Hive is well integrated with **Slack** and most **CI/CD** systems to get you up and running
55-
as smoothly as possible!
62+
GraphQL Hive is well integrated with **Slack**, **MS Teams** and most **CI/CD** systems to get you
63+
up and running as smoothly as possible!
5664

57-
GraphQL Hive can notify your team when schema changes occur, either via Slack or a custom webhook.
65+
GraphQL Hive can notify your team when schema changes occur, either via Slack, MS Teams or a custom
66+
webhook.
5867

5968
Also, the Hive CLI allows integration of the schema checks mechanism to all CI/CD systems (GitHub,
6069
BitBucket, Azure, and others). The same applies to schema publishing and operations checks.

codegen.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ const config: CodegenConfig = {
140140
AlertChannel: '../modules/alerts/module.graphql.mappers#AlertChannelMapper',
141141
AlertSlackChannel: '../modules/alerts/module.graphql.mappers#AlertSlackChannelMapper',
142142
AlertWebhookChannel: '../modules/alerts/module.graphql.mappers#AlertWebhookChannelMapper',
143+
TeamsWebhookChannel: '../modules/alerts/module.graphql.mappers#TeamsWebhookChannelMapper',
143144
Alert: '../modules/alerts/module.graphql.mappers#AlertMapper',
144145
AdminQuery: '../modules/admin/module.graphql.mappers#AdminQueryMapper',
145146
AdminStats: '../modules/admin/module.graphql.mappers#AdminStatsMapper',

docs/DEVELOPMENT.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
Developing Hive locally requires you to have the following software installed locally:
66

77
- Node.js 21 (or `nvm` or `fnm`)
8-
- pnpm v8
9-
- Docker
8+
- pnpm v9
9+
- Docker version 26.1.1 or later(previous versions will not work correctly on arm64)
10+
- make sure these ports are free: 5432, 6379, 9000, 9001, 8123, 9092, 8081, 8082, 9644, 3567, 7043
1011

1112
## Setup Instructions
1213

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"build:web": "pnpm prebuild && pnpm turbo build --filter=./packages/web/* --color",
2626
"cargo:fix": "bash ./scripts/fix-symbolic-link.sh",
2727
"docker:build": "docker buildx bake -f docker/docker.hcl --load build",
28+
"docker:override-up": "docker compose -f ./docker/docker-compose.override.yml up -d --remove-orphans",
2829
"env:sync": "tsx scripts/sync-env-files.ts",
2930
"generate": "pnpm --filter @hive/storage db:generate && pnpm graphql:generate",
3031
"graphql:generate": "graphql-codegen --config codegen.mts",
@@ -33,7 +34,7 @@
3334
"lint:env-template": "tsx scripts/check-env-template.ts",
3435
"lint:fix": "pnpm lint --fix",
3536
"lint:prettier": "prettier --cache --check .",
36-
"local:setup": "docker-compose -f ./docker/docker-compose.dev.yml up -d --remove-orphans && pnpm --filter @hive/migrations db:init",
37+
"local:setup": "docker compose -f ./docker/docker-compose.dev.yml up -d --remove-orphans && pnpm --filter @hive/migrations db:init",
3738
"postinstall": "node ./scripts/patch-manifests.js && pnpm env:sync && node ./scripts/turborepo-cleanup.js && pnpm cargo:fix",
3839
"pre-commit": "exit 0 && lint-staged",
3940
"prebuild": "rimraf deploy-tmp && rimraf packages/**/deploy-tmp",
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
type Query {
2+
foo: Int!
3+
bar: String
4+
test: String
5+
last: Boolean
6+
fooTwo: Int!
7+
}
8+
9+
type Mutation {
10+
addFooAnother(foo: Int!): Int!
11+
addBar(bar: String): String
12+
addTest(test: String): String
13+
}
14+
15+
schema {
16+
query: Query
17+
mutation: Mutation
18+
}
19+
# test 3
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { type MigrationExecutor } from '../pg-migrator';
2+
3+
export default {
4+
name: '2024.06.11T10-10-00.ms-teams-webhook.ts',
5+
run: ({ sql }) => sql`
6+
ALTER TYPE alert_channel_type ADD VALUE 'MSTEAMS_WEBHOOK';
7+
`,
8+
} satisfies MigrationExecutor;

packages/migrations/src/run-pg-migrations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ import migration_2024_01_12_01T00_00_00_contracts from './actions/2024.01.26T00.
6363
import migration_2024_01_12_01T00_00_00_schema_check_pagination_index_update from './actions/2024.01.26T00.00.01.schema-check-pagination-index-update';
6464
import migration_2024_02_19_01T00_00_00_schema_check_store_breaking_change_metadata from './actions/2024.02.19T00.00.01.schema-check-store-breaking-change-metadata';
6565
import migration_2024_04_09T10_10_00_check_approval_comment from './actions/2024.04.09T10-10-00.check-approval-comment';
66+
import migration_2024_06_11T10_10_00_ms_teams_webhook from './actions/2024.06.11T10-10-00.ms-teams-webhook';
6667
import { runMigrations } from './pg-migrator';
6768

6869
export const runPGMigrations = (args: { slonik: DatabasePool; runTo?: string }) =>
@@ -134,5 +135,6 @@ export const runPGMigrations = (args: { slonik: DatabasePool; runTo?: string })
134135
migration_2024_01_12_01T00_00_00_schema_check_pagination_index_update,
135136
migration_2024_02_19_01T00_00_00_schema_check_store_breaking_change_metadata,
136137
migration_2024_04_09T10_10_00_check_approval_comment,
138+
migration_2024_06_11T10_10_00_ms_teams_webhook,
137139
],
138140
});

packages/services/api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
"slonik": "30.4.4",
6363
"supertokens-node": "15.2.1",
6464
"tslib": "2.6.3",
65+
"vitest": "1.6.0",
6566
"zod": "3.23.8",
6667
"zod-validation-error": "3.3.0"
6768
}

0 commit comments

Comments
 (0)