Compare commits

..

2 Commits

Author SHA1 Message Date
github-actions[bot]
82728da100 chore: update versions (#2556)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @nhost/apollo@6.0.7

### Patch Changes

-   @nhost/nhost-js@3.0.7

## @nhost/react-apollo@9.0.2

### Patch Changes

-   @nhost/apollo@6.0.7
-   @nhost/react@3.2.2

## @nhost/react-urql@6.0.2

### Patch Changes

-   @nhost/react@3.2.2

## @nhost/graphql-js@0.1.7

### Patch Changes

- 2d68fee: fix: resolve an issue where unauthenticated graphql requests
are not sent

## @nhost/nextjs@2.1.4

### Patch Changes

-   @nhost/react@3.2.2

## @nhost/nhost-js@3.0.7

### Patch Changes

-   Updated dependencies [2d68fee]
    -   @nhost/graphql-js@0.1.7

## @nhost/react@3.2.2

### Patch Changes

-   @nhost/nhost-js@3.0.7

## @nhost/vue@2.2.2

### Patch Changes

-   @nhost/nhost-js@3.0.7

## @nhost/dashboard@1.8.1

### Patch Changes

-   @nhost/react-apollo@9.0.2
-   @nhost/nextjs@2.1.4

## @nhost-examples/cli@0.1.8

### Patch Changes

-   @nhost/nhost-js@3.0.7

## @nhost-examples/codegen-react-apollo@0.1.16

### Patch Changes

-   @nhost/react@3.2.2
-   @nhost/react-apollo@9.0.2

## @nhost-examples/codegen-react-query@0.1.17

### Patch Changes

-   @nhost/react@3.2.2

## @nhost-examples/codegen-react-urql@0.0.13

### Patch Changes

-   @nhost/react@3.2.2
-   @nhost/react-urql@6.0.2

## @nhost-examples/multi-tenant-one-to-many@2.0.6

### Patch Changes

-   @nhost/nhost-js@3.0.7

## @nhost-examples/nextjs@0.1.18

### Patch Changes

-   @nhost/react@3.2.2
-   @nhost/react-apollo@9.0.2
-   @nhost/nextjs@2.1.4

## @nhost-examples/node-storage@0.0.10

### Patch Changes

-   @nhost/nhost-js@3.0.7

## @nhost-examples/nextjs-server-components@0.2.4

### Patch Changes

-   @nhost/nhost-js@3.0.7

## @nhost-examples/react-apollo@0.3.2

### Patch Changes

-   @nhost/react@3.2.2
-   @nhost/react-apollo@9.0.2

## @nhost-examples/react-gqty@1.0.6

### Patch Changes

-   @nhost/react@3.2.2

## @nhost-examples/vue-apollo@0.2.3

### Patch Changes

-   @nhost/nhost-js@3.0.7
-   @nhost/apollo@6.0.7
-   @nhost/vue@2.2.2

## @nhost-examples/vue-quickstart@0.0.15

### Patch Changes

-   @nhost/apollo@6.0.7
-   @nhost/vue@2.2.2

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-23 21:14:11 +01:00
Hassan Ben Jobrane
2d68fee54c fix(graphql-js): allow graphql requests with no access token (#2555) 2024-02-23 21:09:45 +01:00
43 changed files with 167 additions and 30 deletions

View File

@@ -1,5 +1,12 @@
# @nhost/dashboard # @nhost/dashboard
## 1.8.1
### Patch Changes
- @nhost/react-apollo@9.0.2
- @nhost/nextjs@2.1.4
## 1.8.0 ## 1.8.0
### Minor Changes ### Minor Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/dashboard", "name": "@nhost/dashboard",
"version": "1.8.0", "version": "1.8.1",
"private": true, "private": true,
"scripts": { "scripts": {
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/cli # @nhost-examples/cli
## 0.1.8
### Patch Changes
- @nhost/nhost-js@3.0.7
## 0.1.7 ## 0.1.7
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost-examples/cli", "name": "@nhost-examples/cli",
"version": "0.1.7", "version": "0.1.8",
"main": "src/index.mjs", "main": "src/index.mjs",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@@ -1,5 +1,12 @@
# @nhost-examples/codegen-react-apollo # @nhost-examples/codegen-react-apollo
## 0.1.16
### Patch Changes
- @nhost/react@3.2.2
- @nhost/react-apollo@9.0.2
## 0.1.15 ## 0.1.15
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost-examples/codegen-react-apollo", "name": "@nhost-examples/codegen-react-apollo",
"version": "0.1.15", "version": "0.1.16",
"private": true, "private": true,
"scripts": { "scripts": {
"codegen": "graphql-codegen", "codegen": "graphql-codegen",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/codegen-react-query # @nhost-examples/codegen-react-query
## 0.1.17
### Patch Changes
- @nhost/react@3.2.2
## 0.1.16 ## 0.1.16
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost-examples/codegen-react-query", "name": "@nhost-examples/codegen-react-query",
"version": "0.1.16", "version": "0.1.17",
"private": true, "private": true,
"scripts": { "scripts": {
"codegen": "graphql-codegen", "codegen": "graphql-codegen",

View File

@@ -1,5 +1,12 @@
# @nhost-examples/react-urql # @nhost-examples/react-urql
## 0.0.13
### Patch Changes
- @nhost/react@3.2.2
- @nhost/react-urql@6.0.2
## 0.0.12 ## 0.0.12
### Patch Changes ### Patch Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@nhost-examples/codegen-react-urql", "name": "@nhost-examples/codegen-react-urql",
"private": true, "private": true,
"version": "0.0.12", "version": "0.0.13",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "tsc && vite build", "build": "tsc && vite build",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/multi-tenant-one-to-many # @nhost-examples/multi-tenant-one-to-many
## 2.0.6
### Patch Changes
- @nhost/nhost-js@3.0.7
## 2.0.5 ## 2.0.5
### Patch Changes ### Patch Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@nhost-examples/multi-tenant-one-to-many", "name": "@nhost-examples/multi-tenant-one-to-many",
"private": true, "private": true,
"version": "2.0.5", "version": "2.0.6",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": {}, "scripts": {},

View File

@@ -1,5 +1,13 @@
# @nhost-examples/nextjs # @nhost-examples/nextjs
## 0.1.18
### Patch Changes
- @nhost/react@3.2.2
- @nhost/react-apollo@9.0.2
- @nhost/nextjs@2.1.4
## 0.1.17 ## 0.1.17
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost-examples/nextjs", "name": "@nhost-examples/nextjs",
"version": "0.1.17", "version": "0.1.18",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/node-storage # @nhost-examples/node-storage
## 0.0.10
### Patch Changes
- @nhost/nhost-js@3.0.7
## 0.0.9 ## 0.0.9
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost-examples/node-storage", "name": "@nhost-examples/node-storage",
"version": "0.0.9", "version": "0.0.10",
"private": true, "private": true,
"description": "This is an example of how to use the Storage with Node.js", "description": "This is an example of how to use the Storage with Node.js",
"main": "src/index.mjs", "main": "src/index.mjs",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/nextjs-server-components # @nhost-examples/nextjs-server-components
## 0.2.4
### Patch Changes
- @nhost/nhost-js@3.0.7
## 0.2.3 ## 0.2.3
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost-examples/nextjs-server-components", "name": "@nhost-examples/nextjs-server-components",
"version": "0.2.3", "version": "0.2.4",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",

View File

@@ -1,5 +1,12 @@
# @nhost-examples/react-apollo # @nhost-examples/react-apollo
## 0.3.2
### Patch Changes
- @nhost/react@3.2.2
- @nhost/react-apollo@9.0.2
## 0.3.1 ## 0.3.1
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost-examples/react-apollo", "name": "@nhost-examples/react-apollo",
"version": "0.3.1", "version": "0.3.2",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@apollo/client": "^3.9.4", "@apollo/client": "^3.9.4",

View File

@@ -1,5 +1,11 @@
# @nhost-examples/react-gqty # @nhost-examples/react-gqty
## 1.0.6
### Patch Changes
- @nhost/react@3.2.2
## 1.0.5 ## 1.0.5
### Patch Changes ### Patch Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@nhost-examples/react-gqty", "name": "@nhost-examples/react-gqty",
"private": true, "private": true,
"version": "1.0.5", "version": "1.0.6",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@@ -1,5 +1,13 @@
# @nhost-examples/vue-apollo # @nhost-examples/vue-apollo
## 0.2.3
### Patch Changes
- @nhost/nhost-js@3.0.7
- @nhost/apollo@6.0.7
- @nhost/vue@2.2.2
## 0.2.2 ## 0.2.2
### Patch Changes ### Patch Changes

View File

@@ -1,7 +1,7 @@
{ {
"name": "@nhost-examples/vue-apollo", "name": "@nhost-examples/vue-apollo",
"private": true, "private": true,
"version": "0.2.2", "version": "0.2.3",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build": "vite build", "build": "vite build",

View File

@@ -1,5 +1,12 @@
# @nhost-examples/vue-quickstart # @nhost-examples/vue-quickstart
## 0.0.15
### Patch Changes
- @nhost/apollo@6.0.7
- @nhost/vue@2.2.2
## 0.0.14 ## 0.0.14
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost-examples/vue-quickstart", "name": "@nhost-examples/vue-quickstart",
"version": "0.0.14", "version": "0.0.15",
"private": true, "private": true,
"scripts": { "scripts": {
"build": "vite build", "build": "vite build",

View File

@@ -1,5 +1,11 @@
# @nhost/apollo # @nhost/apollo
## 6.0.7
### Patch Changes
- @nhost/nhost-js@3.0.7
## 6.0.6 ## 6.0.6
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/apollo", "name": "@nhost/apollo",
"version": "6.0.6", "version": "6.0.7",
"description": "Nhost Apollo Client library", "description": "Nhost Apollo Client library",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,12 @@
# @nhost/react-apollo # @nhost/react-apollo
## 9.0.2
### Patch Changes
- @nhost/apollo@6.0.7
- @nhost/react@3.2.2
## 9.0.1 ## 9.0.1
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/react-apollo", "name": "@nhost/react-apollo",
"version": "9.0.1", "version": "9.0.2",
"description": "Nhost React Apollo client", "description": "Nhost React Apollo client",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/react-urql # @nhost/react-urql
## 6.0.2
### Patch Changes
- @nhost/react@3.2.2
## 6.0.1 ## 6.0.1
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/react-urql", "name": "@nhost/react-urql",
"version": "6.0.1", "version": "6.0.2",
"description": "Nhost React URQL client", "description": "Nhost React URQL client",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/graphql-js # @nhost/graphql-js
## 0.1.7
### Patch Changes
- 2d68fee: fix: resolve an issue where unauthenticated graphql requests are not sent
## 0.1.6 ## 0.1.6
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/graphql-js", "name": "@nhost/graphql-js",
"version": "0.1.6", "version": "0.1.7",
"description": "Nhost GraphQL client", "description": "Nhost GraphQL client",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -30,9 +30,9 @@ export class NhostGraphqlClient {
this.adminSecret = adminSecret this.adminSecret = adminSecret
} }
private isAccessTokenValid = () => { private isAccessTokenValidOrNull = () => {
if (!this.accessToken) { if (!this.accessToken) {
return false return true
} }
try { try {
@@ -44,21 +44,21 @@ export class NhostGraphqlClient {
} }
} }
private awaitForValidAccessToken = async () => { private awaitForValidAccessTokenOrNull = async () => {
if (this.isAccessTokenValid()) { if (this.isAccessTokenValidOrNull()) {
return true return true
} }
const waitForValidToken = () => { const waitForValidTokenOrNull = () => {
if (this.isAccessTokenValid()) { if (this.isAccessTokenValidOrNull()) {
return Promise.resolve(true) return Promise.resolve(true)
} }
return new Promise((resolve) => { return new Promise((resolve) => {
setTimeout(() => waitForValidToken().then(resolve), 100) setTimeout(() => waitForValidTokenOrNull().then(resolve), 100)
}) })
} }
return waitForValidToken() return waitForValidTokenOrNull()
} }
/** /**
@@ -106,7 +106,7 @@ export class NhostGraphqlClient {
if (!process.env.TEST_MODE) { if (!process.env.TEST_MODE) {
// We skip this while running unit tests because the accessToken is generated using faker // We skip this while running unit tests because the accessToken is generated using faker
await this.awaitForValidAccessToken() await this.awaitForValidAccessTokenOrNull()
} }
try { try {

View File

@@ -1,5 +1,11 @@
# @nhost/nextjs # @nhost/nextjs
## 2.1.4
### Patch Changes
- @nhost/react@3.2.2
## 2.1.3 ## 2.1.3
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/nextjs", "name": "@nhost/nextjs",
"version": "2.1.3", "version": "2.1.4",
"description": "Nhost NextJS library", "description": "Nhost NextJS library",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,12 @@
# @nhost/nhost-js # @nhost/nhost-js
## 3.0.7
### Patch Changes
- Updated dependencies [2d68fee]
- @nhost/graphql-js@0.1.7
## 3.0.6 ## 3.0.6
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/nhost-js", "name": "@nhost/nhost-js",
"version": "3.0.6", "version": "3.0.7",
"description": "Nhost JavaScript SDK", "description": "Nhost JavaScript SDK",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/react # @nhost/react
## 3.2.2
### Patch Changes
- @nhost/nhost-js@3.0.7
## 3.2.1 ## 3.2.1
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/react", "name": "@nhost/react",
"version": "3.2.1", "version": "3.2.2",
"description": "Nhost React library", "description": "Nhost React library",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [

View File

@@ -1,5 +1,11 @@
# @nhost/vue # @nhost/vue
## 2.2.2
### Patch Changes
- @nhost/nhost-js@3.0.7
## 2.2.1 ## 2.2.1
### Patch Changes ### Patch Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@nhost/vue", "name": "@nhost/vue",
"version": "2.2.1", "version": "2.2.2",
"description": "Nhost Vue library", "description": "Nhost Vue library",
"license": "MIT", "license": "MIT",
"keywords": [ "keywords": [