From 982c3c7de58ff2dc1104fe4c2ba96f77c9d2a812 Mon Sep 17 00:00:00 2001 From: TheGuildBot <59414373+theguild-bot@users.noreply.github.com> Date: Wed, 25 Dec 2024 03:34:19 -0500 Subject: [PATCH] chore(release): update monorepo packages versions (#8191) Co-authored-by: github-actions[bot] --- .changeset/odd-pants-sing.md | 25 ------------------- packages/plugins/jwt-auth/CHANGELOG.md | 34 ++++++++++++++++++++++++++ packages/plugins/jwt-auth/package.json | 2 +- 3 files changed, 35 insertions(+), 26 deletions(-) delete mode 100644 .changeset/odd-pants-sing.md diff --git a/.changeset/odd-pants-sing.md b/.changeset/odd-pants-sing.md deleted file mode 100644 index 65782771d8052..0000000000000 --- a/.changeset/odd-pants-sing.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'@graphql-mesh/plugin-jwt-auth': minor ---- - -[#3590](https://github.com/dotansimha/graphql-yoga/pull/3590) -Do not throw when \`request\` is not available in the context, it can be a WebSockets connection - -- Export helper `extractFromConnectionParams` to get the token from WebSocket `connectionParams` - when GraphQL WS is used like - [here](https://the-guild.dev/graphql/yoga-server/docs/features/subscriptions#graphql-over-websocket-protocol-via-graphql-ws) - -```ts -import { defineConfig, extractFromConnectionParams, extractFromHeader, useJWT } from '@graphql-hive/gateway'; - -export const gatewayConfig = defineConfig({ - jwt: { - // So it will look for the token in the connectionParams.my-token field in case of a WebSockets connection - // It will check WS params and headers, and get the available one - lookupLocations: [ - extractFromConnectionParams({ name: 'my-token' }), - extractFromHeader({ name: 'authorization', prefix: 'Bearer ' }) - ] - } - }) -``` diff --git a/packages/plugins/jwt-auth/CHANGELOG.md b/packages/plugins/jwt-auth/CHANGELOG.md index 43b713034817a..bb5a6f5905089 100644 --- a/packages/plugins/jwt-auth/CHANGELOG.md +++ b/packages/plugins/jwt-auth/CHANGELOG.md @@ -1,5 +1,39 @@ # @graphql-mesh/plugin-jwt-auth +## 1.4.0 + +### Minor Changes + +- [#8189](https://github.com/ardatan/graphql-mesh/pull/8189) + [`83a73ab`](https://github.com/ardatan/graphql-mesh/commit/83a73abef2c156c56d406b266d37fd78c6f4a3e9) + Thanks [@jjangga0214](https://github.com/jjangga0214)! - + [#3590](https://github.com/dotansimha/graphql-yoga/pull/3590) Do not throw when \`request\` is not + available in the context, it can be a WebSockets connection + + - Export helper `extractFromConnectionParams` to get the token from WebSocket `connectionParams` + when GraphQL WS is used like + [here](https://the-guild.dev/graphql/yoga-server/docs/features/subscriptions#graphql-over-websocket-protocol-via-graphql-ws) + + ```ts + import { + defineConfig, + extractFromConnectionParams, + extractFromHeader, + useJWT + } from '@graphql-hive/gateway' + + export const gatewayConfig = defineConfig({ + jwt: { + // So it will look for the token in the connectionParams.my-token field in case of a WebSockets connection + // It will check WS params and headers, and get the available one + lookupLocations: [ + extractFromConnectionParams({ name: 'my-token' }), + extractFromHeader({ name: 'authorization', prefix: 'Bearer ' }) + ] + } + }) + ``` + ## 1.3.10 ### Patch Changes diff --git a/packages/plugins/jwt-auth/package.json b/packages/plugins/jwt-auth/package.json index d8d03a5aa65e4..f1e64197dcb56 100644 --- a/packages/plugins/jwt-auth/package.json +++ b/packages/plugins/jwt-auth/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-mesh/plugin-jwt-auth", - "version": "1.3.10", + "version": "1.4.0", "type": "module", "repository": { "type": "git",