Compare commits

...

44 Commits

Author SHA1 Message Date
Szilárd Dóró
5e2ecb4d1e Merge pull request #1749 from nhost/changeset-release/main
chore: update versions
2023-03-20 10:00:29 +01:00
github-actions[bot]
52ebbef762 chore: update versions 2023-03-17 15:01:14 +00:00
Szilárd Dóró
82faa4ca0a Merge pull request #1748 from nhost/fix/presigned-url-params
fix(hasura-storage-js): allow image transformation parameters in `getPresignedUrl`
2023-03-17 15:58:38 +01:00
Szilárd Dóró
d06a21764a fix unit tests 2023-03-17 15:10:15 +01:00
Szilárd Dóró
8b54d290a5 Merge pull request #1747 from nhost/changeset-release/main
chore: update versions
2023-03-17 14:51:41 +01:00
Szilárd Dóró
4cfa6bbe1e chore: update changeset 2023-03-17 14:12:48 +01:00
Szilárd Dóró
614f213e26 feat: allow image transformation parameters in getPresignedUrl 2023-03-17 14:11:17 +01:00
github-actions[bot]
4eebf51821 chore: update versions 2023-03-17 11:29:52 +00:00
Szilárd Dóró
9a52298aa7 Merge pull request #1746 from nhost/fix/data-grid-date-cell
fix(dashboard): show correct date in data grid
2023-03-17 12:28:34 +01:00
Szilárd Dóró
099eebe602 Merge pull request #1745 from nhost/fix/disable-new-users
fix(dashboard): disable new users
2023-03-17 12:20:38 +01:00
Szilárd Dóró
798e591b1d fix: show correct date in data grid 2023-03-17 10:19:39 +01:00
Szilárd Dóró
b48bc034ca chore: add changeset 2023-03-17 10:01:26 +01:00
Szilárd Dóró
f57819230b fix: disable new users 2023-03-17 10:00:25 +01:00
Szilárd Dóró
4b6df8b9d6 Merge pull request #1731 from nhost/changeset-release/main
chore: update versions
2023-03-16 10:23:45 +01:00
Szilárd Dóró
a2af5a674d fix(deps): fix @nhost/apollo version 2023-03-16 09:55:43 +01:00
github-actions[bot]
c33c1fd6b9 chore: update versions 2023-03-16 08:37:32 +00:00
Szilárd Dóró
041d9b98e3 Merge pull request #1741 from nhost/renovate/stripe-react-stripe-js-2.x
fix(deps): update dependency @stripe/react-stripe-js to v2
2023-03-16 09:37:26 +01:00
Szilárd Dóró
e4b4940397 Merge pull request #1730 from nhost/chore/remove-axios-deprecation
fix: remove `useAxios`, restore autogenerated docs
2023-03-16 09:36:09 +01:00
renovate[bot]
be91f4ed2a fix(deps): update dependency @stripe/react-stripe-js to v2 2023-03-13 22:14:47 +00:00
Siarhei Lipchyk
ec6ba846cf Merge pull request #1732 from nhost/chore/dashboard-hasura-admin-secret
Allow to override hasura admin secret in docker
2023-03-13 10:01:47 +01:00
Siarhei Lipchyk
d8d8394b3b Allow to override hasura admin secret in docker 2023-03-10 13:11:02 +01:00
Szilárd Dóró
f051a121b2 Merge pull request #1729 from nhost/fix/sdk-backend-url 2023-03-10 12:37:48 +01:00
Szilárd Dóró
6ed46ce2d4 fix(docs): fix broken link 2023-03-10 11:15:22 +01:00
Szilárd Dóró
bfb4c1a6cc fix docs and remove useAxios 2023-03-10 11:04:51 +01:00
Szilárd Dóró
776c8f9237 Merge pull request #1721 from nhost/changeset-release/main
chore: update versions
2023-03-10 11:03:55 +01:00
github-actions[bot]
c0773d82e9 chore: update versions 2023-03-10 09:38:58 +00:00
Siarhei Lipchyk
c46b1383f2 Merge pull request #1724 from nhost/fix/dashboard-docker-entrypoint
Fix default values for placeholders
2023-03-10 10:37:46 +01:00
Siarhei Lipchyk
beed2eba21 Fix default values for placeholders 2023-03-10 10:36:01 +01:00
Szilárd Dóró
70f9610041 Merge pull request #1723 from nhost/fix/provisioning-status-indicator
fix(dashboard): miscellaneous fixes
2023-03-10 10:23:22 +01:00
Szilárd Dóró
e91de1088d chore: remove unused helper 2023-03-10 10:22:56 +01:00
Szilárd Dóró
ce1ee40dab fix: deprecate backendUrl, allow other params 2023-03-10 10:22:11 +01:00
Szilárd Dóró
bd7929f5ed revert provisioning status changes 2023-03-10 09:35:36 +01:00
Szilárd Dóró
2c8559a319 fix(dashboard): misc fixes 2023-03-09 15:54:17 +01:00
Szilárd Dóró
bd5ea5ee3a Merge pull request #1722 from nhost/chore/renovate-ci
chore(ci): remove renovate changeset automation
2023-03-09 13:09:59 +01:00
Szilárd Dóró
3538dbac39 chore(ci): remove renovate changeset automation 2023-03-09 11:12:06 +01:00
Szilárd Dóró
03b5cda69a Merge pull request #1700 from nhost/renovate/graphiql-react-0.x
fix(deps): update dependency @graphiql/react to ^0.17.0
2023-03-09 11:08:04 +01:00
Szilárd Dóró
4329d04854 chore: bump graphiql dependencies 2023-03-09 10:41:46 +01:00
Szilárd Dóró
ca50c5ce0c Merge remote-tracking branch 'origin/main' into renovate/graphiql-react-0.x 2023-03-09 10:25:37 +01:00
Szilárd Dóró
a3271ed014 Merge pull request #1719 from nhost/changeset-release/main
chore: update versions
2023-03-09 10:14:06 +01:00
github-actions[bot]
d4fc99a77c chore: update versions 2023-03-09 08:20:32 +00:00
Szilárd Dóró
d90fcf3c24 Merge pull request #1713 from nhost/chore/mimir-cleanup
chore(dashboard): mimir migration cleanup
2023-03-09 09:19:06 +01:00
Szilárd Dóró
001b3dccec chore: update codegen 2023-03-07 14:50:26 +01:00
Szilárd Dóró
cbb1fc5bc8 chore: cleanup GraphQL operations 2023-03-07 11:23:55 +01:00
renovate[bot]
0ec3abf47c fix(deps): update dependency @graphiql/react to ^0.17.0 2023-03-03 00:19:25 +00:00
70 changed files with 472 additions and 3212 deletions

View File

@@ -1,89 +0,0 @@
name: Renovate
on:
pull_request:
branches: [main]
types: [closed]
paths-ignore:
- 'assets/**'
- '**.md'
- 'LICENSE'
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: nhost
jobs:
renovate-changeset:
name: Add changeset
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'renovate/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}
# * Install Node and dependencies. Package downloads will be cached for the next jobs.
- name: Install Node and dependencies
uses: ./.github/actions/install-dependencies
with:
TURBO_TOKEN: ${{ env.TURBO_TOKEN }}
TURBO_TEAM: ${{ env.TURBO_TEAM }}
BUILD: 'none'
- name: Determine bumps
id: bumps
run: |
LAST_NON_PR_SHA=$(git log --no-merges main origin/${{ github.head_ref }} --format=format:%h -- | head -2 | tail -1)
echo "result<<EOF" >> $GITHUB_OUTPUT
pnpm recursive list --depth -1 --parseable \
--filter='!nhost-root' \
--filter=[$LAST_NON_PR_SHA] \
| xargs -I@ jq ".name" @/package.json \
| sort \
| uniq -u \
| awk '$0=$0": patch"' \
>> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- name: Install dictionary
if: steps.bumps.outputs.result != ''
run: sudo apt-get install wbritish
- name: Generate changeset file name
id: file_name
if: steps.bumps.outputs.result != ''
run: |
FILE_NAME=$(shuf -n 3 /usr/share/dict/words | tr '\n' '-' | sed 's/-$//' | sed 's/'"'"'s//g' | tr '[:upper:]' '[:lower:]')
echo "result=./.changeset/${FILE_NAME}.md" >> $GITHUB_OUTPUT
- name: Create changeset file
if: steps.bumps.outputs.result != ''
run: |
cat <<EOF > ${{ steps.file_name.outputs.result }}
---
${{ steps.bumps.outputs.result }}
---
${{ github.event.pull_request.title }}
EOF
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GH_PAT }}
commit-message: ${{ github.event.pull_request.title }}
branch: renovate-changesets
delete-branch: true
title: 'chore: create changesest from Renovate bumps'
labels: |
dependencies
body: |
This PR creates the changesets from the Renovate dependencies that have been merged to main.
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.GH_PAT }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
- name: Auto approve
if: steps.cpr.outputs.pull-request-operation == 'created'
uses: juliangruber/approve-pull-request-action@v2
with:
github-token: ${{ secrets.GH_PAT }}
number: ${{ steps.cpr.outputs.pull-request-number }}

View File

@@ -1,5 +1,43 @@
# @nhost/dashboard
## 0.13.5
### Patch Changes
- @nhost/react-apollo@5.0.12
- @nhost/nextjs@1.13.17
## 0.13.4
### Patch Changes
- b48bc034: fix(dashboard): disable new users
- 798e591b: fix(dashboard): show correct date in data grid
## 0.13.3
### Patch Changes
- bfb4c1a6: chore(dashboard): remove `useAxios` property
- d8d8394b: Dashboard: allow to override hasura admin secret in docker
- Updated dependencies [ce1ee40d]
- @nhost/nextjs@1.13.16
- @nhost/react-apollo@5.0.11
## 0.13.2
### Patch Changes
- beed2eba: Fix docker entrypoint for dashboard
- 2c8559a3: fix(dashboard): refresh project list after deleting a project
- 4329d048: chore(dashboard): bump `graphiql` dependencies
## 0.13.1
### Patch Changes
- cbb1fc5b: chore(dashboard): cleanup GraphQL operations
## 0.13.0
### Minor Changes

View File

@@ -20,6 +20,7 @@ ENV NEXT_PUBLIC_ENV dev
ENV NEXT_PUBLIC_NHOST_PLATFORM false
# placeholders for URLs, will be replaced on runtime by entrypoint script
ENV NEXT_PUBLIC_NHOST_ADMIN_SECRET __NEXT_PUBLIC_NHOST_ADMIN_SECRET__
ENV NEXT_PUBLIC_NHOST_AUTH_URL __NEXT_PUBLIC_NHOST_AUTH_URL__
ENV NEXT_PUBLIC_NHOST_FUNCTIONS_URL __NEXT_PUBLIC_NHOST_FUNCTIONS_URL__
ENV NEXT_PUBLIC_NHOST_GRAPHQL_URL __NEXT_PUBLIC_NHOST_GRAPHQL_URL__

View File

@@ -3,15 +3,17 @@
set -euo pipefail
# read URLs from env variables (with defaults)
NEXT_PUBLIC_NHOST_AUTH_URL="${NEXT_PUBLIC_NHOST_AUTH_URL:-"http://localhost:1337/v1/auth"}"
NEXT_PUBLIC_NHOST_FUNCTIONS_URL="${NEXT_PUBLIC_NHOST_FUNCTIONS_URL:-"http://localhost:1337/v1/functions"}"
NEXT_PUBLIC_NHOST_GRAPHQL_URL="${NEXT_PUBLIC_NHOST_GRAPHQL_URL:-"http://localhost:1337/v1/graphql"}"
NEXT_PUBLIC_NHOST_STORAGE_URL="${NEXT_PUBLIC_NHOST_STORAGE_URL:-"http://localhost:1337/v1/storage"}"
NEXT_PUBLIC_NHOST_HASURA_CONSOLE_URL="${NEXT_PUBLIC_NHOST_HASURA_CONSOLE_URL:-"http://localhost:9695"}"
NEXT_PUBLIC_NHOST_HASURA_MIGRATIONS_API_URL="${NEXT_PUBLIC_NHOST_HASURA_MIGRATIONS_API_URL:-"http://localhost:9693"}"
NEXT_PUBLIC_NHOST_HASURA_API_URL="${NEXT_PUBLIC_NHOST_HASURA_API_URL:-"http://localhost:8080"}"
NEXT_PUBLIC_NHOST_ADMIN_SECRET="${NEXT_PUBLIC_NHOST_ADMIN_SECRET:-nhost-admin-secret}"
NEXT_PUBLIC_NHOST_AUTH_URL="${NEXT_PUBLIC_NHOST_AUTH_URL:-http://localhost:1337/v1/auth}"
NEXT_PUBLIC_NHOST_FUNCTIONS_URL="${NEXT_PUBLIC_NHOST_FUNCTIONS_URL:-http://localhost:1337/v1/functions}"
NEXT_PUBLIC_NHOST_GRAPHQL_URL="${NEXT_PUBLIC_NHOST_GRAPHQL_URL:-http://localhost:1337/v1/graphql}"
NEXT_PUBLIC_NHOST_STORAGE_URL="${NEXT_PUBLIC_NHOST_STORAGE_URL:-http://localhost:1337/v1/storage}"
NEXT_PUBLIC_NHOST_HASURA_CONSOLE_URL="${NEXT_PUBLIC_NHOST_HASURA_CONSOLE_URL:-http://localhost:9695}"
NEXT_PUBLIC_NHOST_HASURA_MIGRATIONS_API_URL="${NEXT_PUBLIC_NHOST_HASURA_MIGRATIONS_API_URL:-http://localhost:9693}"
NEXT_PUBLIC_NHOST_HASURA_API_URL="${NEXT_PUBLIC_NHOST_HASURA_API_URL:-http://localhost:8080}"
# replace placeholders
find dashboard -type f -exec sed -i "s~__NEXT_PUBLIC_NHOST_ADMIN_SECRET__~${NEXT_PUBLIC_NHOST_ADMIN_SECRET}~g" {} +
find dashboard -type f -exec sed -i "s~__NEXT_PUBLIC_NHOST_AUTH_URL__~${NEXT_PUBLIC_NHOST_AUTH_URL}~g" {} +
find dashboard -type f -exec sed -i "s~__NEXT_PUBLIC_NHOST_FUNCTIONS_URL__~${NEXT_PUBLIC_NHOST_FUNCTIONS_URL}~g" {} +
find dashboard -type f -exec sed -i "s~__NEXT_PUBLIC_NHOST_GRAPHQL_URL__~${NEXT_PUBLIC_NHOST_GRAPHQL_URL}~g" {} +

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/dashboard",
"version": "0.13.0",
"version": "0.13.5",
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
@@ -25,8 +25,8 @@
"@emotion/styled": "^11.10.5",
"@fontsource/inter": "^4.5.14",
"@fontsource/roboto-mono": "^4.5.8",
"@graphiql/react": "^0.15.0",
"@graphiql/toolkit": "^0.8.0",
"@graphiql/react": "^0.17.0",
"@graphiql/toolkit": "^0.8.2",
"@headlessui/react": "^1.6.5",
"@heroicons/react": "^1.0.6",
"@hookform/resolvers": "^2.9.10",
@@ -37,7 +37,7 @@
"@nhost/nextjs": "workspace:*",
"@nhost/react-apollo": "workspace:*",
"@segment/snippet": "^4.15.3",
"@stripe/react-stripe-js": "^1.10.0",
"@stripe/react-stripe-js": "^2.0.0",
"@stripe/stripe-js": "^1.35.0",
"@tailwindcss/forms": "^0.5.3",
"@tanstack/react-query": "^4.16.1",
@@ -48,7 +48,7 @@
"clsx": "^1.2.1",
"date-fns": "^2.29.3",
"generate-password": "^1.7.0",
"graphiql": "^2.2.0",
"graphiql": "^2.4.0",
"graphql": "^16.6.0",
"graphql-request": "^4.3.0",
"graphql-tag": "^2.12.6",

View File

@@ -46,7 +46,7 @@ export default function DataGridDateCell<TData extends object>({
: undefined;
const { year, month, day, hour, minute, second } = getDateComponents(date, {
adjustTimezone: specificType === 'timetz' || specificType === 'timestamptz',
adjustTimezone: ['date', 'timetz', 'timestamptz'].includes(specificType),
});
const { inputRef, focusCell, isEditing, cancelEditCell } =

View File

@@ -99,7 +99,6 @@ export function InviteAnnounce() {
workspaceMemberInviteId: inviteId,
isAccepted: false,
},
{ useAxios: false },
);
if (ignoreError) {

View File

@@ -35,7 +35,7 @@ export default function DisableNewUsersSettings() {
const form = useForm<DisableNewUsersFormValues>({
reValidateMode: 'onSubmit',
defaultValues: {
disabled: !!data?.config?.auth?.signUp?.enabled,
disabled: !data?.config?.auth?.signUp?.enabled,
},
});

View File

@@ -12,8 +12,8 @@ export function WorkspaceInvoices() {
return (
<div className="mt-18">
<div className="mx-auto max-w-3xl font-display grid grid-flow-row gap-2 justify-start">
<Text className="font-medium text-lg">Invoices</Text>
<div className="mx-auto grid max-w-3xl grid-flow-row justify-start gap-2 font-display">
<Text className="text-lg font-medium">Invoices</Text>
<Button
variant="outlined"
@@ -23,7 +23,6 @@ export function WorkspaceInvoices() {
const { res, error } = await nhost.functions.call(
'/stripe-create-portal',
{ workspaceId: currentWorkspace.id },
{ useAxios: false },
);
if (error) {

View File

@@ -1,14 +0,0 @@
fragment GetAppRoles on apps {
id
slug
subdomain
name
authUserDefaultAllowedRoles
authUserDefaultRole
}
query getAppRolesAndPermissions($id: uuid!) {
app(id: $id) {
...GetAppRoles
}
}

View File

@@ -1,15 +0,0 @@
query getFunctionsLogs($subdomain: String!) {
getFunctionLogs(subdomain: $subdomain) {
functionPath
createdAt
message
}
}
query getFunctionLog($subdomain: String!, $functionPaths: [String!]) {
getFunctionLogs(subdomain: $subdomain, functionPaths: $functionPaths) {
functionPath
createdAt
message
}
}

View File

@@ -1,7 +0,0 @@
query getGravatarSettings($id: uuid!) {
app(id: $id) {
authGravatarEnabled
authGravatarDefault
authGravatarRating
}
}

View File

@@ -1,7 +0,0 @@
mutation restoreDatabaseBackup($appId: uuid!, $backupId: uuid!) {
restoreDatabaseBackup(appId: $appId, backupId: $backupId)
}
mutation scheduleRestoreDatabaseBackup($appId: uuid!, $backupId: uuid!) {
scheduleRestoreDatabaseBackup(appId: $appId, backupId: $backupId)
}

View File

@@ -1,4 +1,7 @@
import { useGetApplicationStateQuery } from '@/generated/graphql';
import {
GetOneUserDocument,
useGetApplicationStateQuery,
} from '@/generated/graphql';
import { ApplicationStatus } from '@/types/application';
import { discordAnnounce } from '@/utils/discordAnnounce';
import { useCallback, useEffect, useState } from 'react';
@@ -30,7 +33,7 @@ export function useCheckProvisioning() {
async function updateOwnCache() {
await client.refetchQueries({
include: ['getOneUser'],
include: [GetOneUserDocument],
});
}

View File

@@ -6,6 +6,7 @@ import SettingsContainer from '@/components/settings/SettingsContainer';
import SettingsLayout from '@/components/settings/SettingsLayout';
import { useUI } from '@/context/UIContext';
import {
GetOneUserDocument,
useDeleteApplicationMutation,
useUpdateAppMutation,
} from '@/generated/graphql';
@@ -15,7 +16,6 @@ import { discordAnnounce } from '@/utils/discordAnnounce';
import { slugifyString } from '@/utils/helpers';
import getServerError from '@/utils/settings/getServerError';
import { getToastStyleProps } from '@/utils/settings/settingsConstants';
import { updateOwnCache } from '@/utils/updateOwnCache';
import { useApolloClient } from '@apollo/client';
import { yupResolver } from '@hookform/resolvers/yup';
import { useRouter } from 'next/router';
@@ -42,6 +42,7 @@ export default function SettingsGeneralPage() {
const client = useApolloClient();
const [deleteApplication] = useDeleteApplicationMutation({
variables: { appId: currentApplication?.id },
refetchQueries: [GetOneUserDocument],
});
const { currentWorkspace } = useCurrentWorkspaceAndApplication();
const router = useRouter();
@@ -134,7 +135,6 @@ export default function SettingsGeneralPage() {
getToastStyleProps(),
);
await router.push('/');
await updateOwnCache(client);
};
return (

View File

@@ -553,8 +553,7 @@ export function NewProjectPageContent({
<Text className="font-medium">Warning</Text>{' '}
<Text className="font-medium">
{submitState.error &&
getErrorMessage(submitState.error, 'application')}{' '}
asdsda
getErrorMessage(submitState.error, 'application')}
</Text>
</Alert>
)}

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,11 @@
# @nhost/docs
## 0.0.14
### Patch Changes
- bfb4c1a6: fix(docs): restore autogenerated `@nhost/nhost-js` docs
## 0.0.13
### Patch Changes

View File

@@ -10,7 +10,7 @@ In this section:
- [Overview](/reference/javascript)
- [Authentication](/reference/javascript/auth)
- [Storage](/reference/javascript/storage)
- [Functions](/reference/javascript/functions)
- [Functions](/reference/javascript/nhost-js/functions)
- [GraphQL](/reference/javascript/graphql)
### React

View File

@@ -1,60 +0,0 @@
---
title: call()
sidebar_label: call()
slug: /reference/javascript/functions/call
description: Use `nhost.functions.call` to call (sending a POST request to) a serverless function.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/nhost-js/src/clients/functions/index.ts#L55
---
# `call()`
## Overload 1 of 2
Use `nhost.functions.call` to call (sending a POST request to) a serverless function.
:::caution Deprecated
Axios will be replaced by cross-fetch in the near future. Only the headers configuration will be kept.
:::
### Parameters
---
**<span className="parameter-name">url</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">data</span>** <span className="optional-status">optional</span> <code>D</code>
---
**<span className="parameter-name">config</span>** <span className="optional-status">optional</span> <code>AxiosRequestConfig&lt;any&gt; &amp; { useAxios: "true" } &amp; [`NhostFunctionCallConfig`](/reference/javascript/functions/types/nhost-function-call-config) &amp; { useAxios: "true" }</code>
---
## Overload 2 of 2
Use `nhost.functions.call` to call (sending a POST request to) a serverless function.
```ts
await nhost.functions.call('send-welcome-email', {
email: 'joe@example.com',
name: 'Joe Doe'
})
```
### Parameters
---
**<span className="parameter-name">url</span>** <span className="optional-status">required</span> <code>string</code>
---
**<span className="parameter-name">data</span>** <span className="optional-status">required</span> <code>D</code>
---
**<span className="parameter-name">config</span>** <span className="optional-status">optional</span> <code>[`NhostFunctionCallConfig`](/reference/javascript/functions/types/nhost-function-call-config) &amp; { useAxios: "false" }</code>
---

View File

@@ -1,23 +0,0 @@
---
title: setAccessToken()
sidebar_label: setAccessToken()
slug: /reference/javascript/functions/set-access-token
description: Use `nhost.functions.setAccessToken` to a set an access token to be used in subsequent functions requests. Note that if you're signin in users with `nhost.auth.signIn()` the access token will be set automatically.
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/nhost-js/src/clients/functions/index.ts#L155
---
# `setAccessToken()`
Use `nhost.functions.setAccessToken` to a set an access token to be used in subsequent functions requests. Note that if you're signin in users with `nhost.auth.signIn()` the access token will be set automatically.
```ts
nhost.functions.setAccessToken('some-access-token')
```
## Parameters
---
**<span className="parameter-name">accessToken</span>** <span className="optional-status">required</span> <code>undefined &#124; string</code>
---

View File

@@ -1,22 +0,0 @@
---
title: NhostFunctionsClient
sidebar_label: Functions
description: No description provided.
slug: /reference/javascript/functions
custom_edit_url: https://github.com/nhost/nhost/edit/main/docs/docs/reference/javascript/functions/index.mdx
---
# `NhostFunctionsClient`
## Parameters
---
**<span className="parameter-name">params</span>** <span className="optional-status">required</span> [`NhostFunctionsConstructorParams`](/reference/javascript/functions/types/nhost-functions-constructor-params)
| Property | Type | Required | Notes |
| :--------------------------------------------------------------------------------------------- | :------------------ | :------: | :---------------------------------------------------------------------------------------- |
| <span className="parameter-name"><span className="light-grey">params.</span>url</span> | <code>string</code> | ✔️ | Serverless Functions endpoint. |
| <span className="parameter-name"><span className="light-grey">params.</span>adminSecret</span> | <code>string</code> | | Admin secret. When set, it is sent as an `x-hasura-admin-secret` header for all requests. |
---

View File

@@ -1,19 +0,0 @@
---
title: NhostFunctionCallConfig
sidebar_label: NhostFunctionCallConfig
description: Subset of RequestInit parameters that are supported by the functions client
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/nhost-js/src/clients/functions/types.ts#L41
---
# `NhostFunctionCallConfig`
Subset of RequestInit parameters that are supported by the functions client
## Parameters
---
**<span className="parameter-name">headers</span>** <span className="optional-status">optional</span> <code>Record&lt;string, string&gt;</code>
---

View File

@@ -1,15 +0,0 @@
---
title: NhostFunctionCallResponse
sidebar_label: NhostFunctionCallResponse
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/nhost-js/src/clients/functions/types.ts#L15
---
# `NhostFunctionCallResponse`
```ts
type NhostFunctionCallResponse =
| { res: { data: T; status: number; statusText: string }; error: null }
| { res: null; error: ErrorPayload }
```

View File

@@ -1,25 +0,0 @@
---
title: NhostFunctionsConstructorParams
sidebar_label: NhostFunctionsConstructorParams
description: No description provided.
displayed_sidebar: referenceSidebar
custom_edit_url: https://github.com/nhost/nhost/edit/main/packages/nhost-js/src/clients/functions/types.ts#L4
---
# `NhostFunctionsConstructorParams`
## Parameters
---
**<span className="parameter-name">url</span>** <span className="optional-status">required</span> <code>string</code>
Serverless Functions endpoint.
---
**<span className="parameter-name">adminSecret</span>** <span className="optional-status">optional</span> <code>string</code>
Admin secret. When set, it is sent as an `x-hasura-admin-secret` header for all requests.
---

View File

@@ -10,7 +10,7 @@ The Nhost JavaScript client is the primary way of interacting with your Nhost pr
- [Authentication](/reference/javascript/auth)
- [Storage](/reference/javascript/storage)
- [Functions](/reference/javascript/functions)
- [Functions](/reference/javascript/nhost-js/functions)
- [GraphQL](/reference/javascript/graphql)
## Installation

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/docs",
"version": "0.0.13",
"version": "0.0.14",
"private": true,
"scripts": {
"docusaurus": "docusaurus",

View File

@@ -111,12 +111,12 @@ const sidebars = {
label: 'Functions',
link: {
type: 'doc',
id: 'reference/javascript/functions/index'
id: 'reference/docgen/javascript/nhost-js/content/nhost-functions-client/index'
},
items: [
{
type: 'autogenerated',
dirName: 'reference/javascript/functions/content'
dirName: 'reference/docgen/javascript/nhost-js/content/nhost-functions-client/content'
}
]
},

View File

@@ -1,5 +1,15 @@
# @nhost-examples/nextjs
## 0.1.8
### Patch Changes
- ce1ee40d: fix(nextjs): allow `subdomain`, `region` and service URLs
- Updated dependencies [ce1ee40d]
- @nhost/nextjs@1.13.16
- @nhost/react@2.0.10
- @nhost/react-apollo@5.0.11
## 0.1.7
### Patch Changes

View File

@@ -1,2 +1 @@
export * from './queries'
export const BACKEND_URL = 'http://127.0.0.1:1337'

View File

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

View File

@@ -6,7 +6,6 @@ import { inspect } from '@xstate/inspect'
import type { AppProps } from 'next/app'
import Head from 'next/head'
import NavBar from '../components/NavBar'
import { BACKEND_URL } from '../helpers'
import '../styles/globals.css?inline'
const devTools = typeof window !== 'undefined' && !!process.env.NEXT_PUBLIC_DEBUG
@@ -16,7 +15,7 @@ if (devTools) {
iframe: false
})
}
const nhost = new NhostClient({ backendUrl: BACKEND_URL, devTools })
const nhost = new NhostClient({ subdomain: 'localhost', devTools })
const title = 'Nhost with NextJs'
function MyApp({ Component, pageProps }: AppProps) {
// * Monorepo-related. See: https://stackoverflow.com/questions/71843247/react-nextjs-type-error-component-cannot-be-used-as-a-jsx-component

View File

@@ -4,10 +4,9 @@ import { Container, Title } from '@mantine/core'
import { getNhostSession, NhostSession, useAccessToken } from '@nhost/nextjs'
import { authProtected } from '../components/protected-route'
import { BACKEND_URL } from '../helpers'
export const getServerSideProps: GetServerSideProps = async (context) => {
const nhostSession = await getNhostSession(BACKEND_URL, context)
const nhostSession = await getNhostSession({ subdomain: 'localhost' }, context)
return {
props: {
nhostSession

View File

@@ -3,10 +3,8 @@ import { GetServerSideProps } from 'next'
import { Container, Title } from '@mantine/core'
import { getNhostSession, NhostSession, useAccessToken, useAuthenticated } from '@nhost/nextjs'
import { BACKEND_URL } from '../helpers'
export const getServerSideProps: GetServerSideProps = async (context) => {
const nhostSession = await getNhostSession(BACKEND_URL, context)
const nhostSession = await getNhostSession({ subdomain: 'localhost' }, context)
return {
props: {
nhostSession

View File

@@ -1,5 +1,18 @@
# @nhost/apollo
## 5.1.1
### Patch Changes
- @nhost/nhost-js@2.1.1
## 5.1.0
### Patch Changes
- Updated dependencies [bfb4c1a6]
- @nhost/nhost-js@2.1.0
## 5.0.9
### Patch Changes

View File

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

View File

@@ -1,5 +1,19 @@
# @nhost/react-apollo
## 5.0.12
### Patch Changes
- @nhost/apollo@5.1.1
- @nhost/react@2.0.11
## 5.0.11
### Patch Changes
- @nhost/apollo@5.1.0
- @nhost/react@2.0.10
## 5.0.10
### Patch Changes

View File

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

View File

@@ -1,5 +1,17 @@
# @nhost/react-urql
## 2.0.11
### Patch Changes
- @nhost/react@2.0.11
## 2.0.10
### Patch Changes
- @nhost/react@2.0.10
## 2.0.9
### Patch Changes

View File

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

View File

@@ -1,5 +1,11 @@
# @nhost/graphql-js
## 0.1.0
### Minor Changes
- bfb4c1a6: chore(sdk): remove deprecated `useAxios` property
## 0.0.5
### Patch Changes

View File

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

View File

@@ -47,6 +47,4 @@ export type NhostGraphqlRequestResponse<T = unknown> =
/** Subset of RequestInit parameters that are supported by the graphql client */
export interface NhostGraphqlRequestConfig {
headers?: Record<string, string>
/** @deprecated Axios has been replaced by cross-fetch. You should now remove this option. */
useAxios?: false
}

View File

@@ -1,5 +1,11 @@
# @nhost/hasura-storage-js
## 2.0.4
### Patch Changes
- 614f213e: fix(hasura-storage-js): allow image transformation parameters in `getPresignedUrl`
## 2.0.3
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/hasura-storage-js",
"version": "2.0.3",
"version": "2.0.4",
"description": "Hasura-storage client",
"license": "MIT",
"keywords": [
@@ -47,6 +47,7 @@
"e2e": "start-test e2e:backend http-get://localhost:9695 ci:test",
"ci:test": "vitest run",
"e2e:backend": "nhost dev --no-browser",
"test": "vitest --config ./vite.unit.config.js",
"test:watch": "vitest",
"test:coverage": "vitest run --coverage",
"prettier": "prettier --check src/",

View File

@@ -129,6 +129,7 @@ export class HasuraStorageClient {
async getPresignedUrl(
params: StorageGetPresignedUrlParams
): Promise<StorageGetPresignedUrlResponse> {
const { fileId, ...imageTransformationParams } = params
const { presignedUrl, error } = await this.api.getPresignedUrl(params)
if (error) {
return { presignedUrl: null, error }
@@ -138,7 +139,18 @@ export class HasuraStorageClient {
return { presignedUrl: null, error: new Error('Invalid file id') }
}
return { presignedUrl, error: null }
const urlWithTransformationParams = appendImageTransformationParameters(
presignedUrl.url,
imageTransformationParams
)
return {
presignedUrl: {
...presignedUrl,
url: urlWithTransformationParams
},
error: null
}
}
/**

View File

@@ -0,0 +1,41 @@
import { expect, test } from 'vitest'
import appendImageTransformationParameters from './appendImageTransformationParameters'
test('should append image transformation parameters to a simple URL', () => {
expect(
appendImageTransformationParameters('https://example.com/', {
width: 100,
height: 100,
blur: 50,
quality: 80
})
).toBe('https://example.com/?w=100&h=100&b=50&q=80')
})
test('should append image transformation parameters to a URL with existing query parameters', () => {
expect(
appendImageTransformationParameters('https://example.com/?foo=bar', {
width: 100,
height: 100,
blur: 50,
quality: 80
})
).toBe('https://example.com/?foo=bar&w=100&h=100&b=50&q=80')
})
test('should not append falsy values', () => {
expect(
appendImageTransformationParameters('https://example.com/', {
width: undefined,
height: 100,
blur: undefined,
quality: 80
})
).toBe('https://example.com/?h=100&q=80')
})
test('should keep the original URL if no transformation parameters are provided', () => {
expect(appendImageTransformationParameters('https://example.com/', {})).toBe(
'https://example.com/'
)
})

View File

@@ -0,0 +1,36 @@
import { StorageImageTransformationParams } from '../types'
/**
* Appends image transformation parameters to the URL. If the URL already
* contains query parameters, the transformation parameters are appended to
* the existing query parameters.
*
* @internal
* @param url - The URL to append the transformation parameters to.
* @param params - The image transformation parameters.
* @returns The URL with the transformation parameters appended.
*/
export default function appendImageTransformationParameters(
url: string,
params: StorageImageTransformationParams
): string {
const urlObject = new URL(url)
// create an object with the transformation parameters by using the first
// character of the parameter name as the key
const imageTransformationParams = Object.entries(params).reduce(
(accumulator, [key, value]) => ({ ...accumulator, [key.charAt(0)]: value }),
{} as Record<string, any>
)
// set the query parameters in the URL object
Object.entries(imageTransformationParams).forEach(([key, value]) => {
if (!value) {
return
}
urlObject.searchParams.set(key, value)
})
return urlObject.toString()
}

View File

@@ -0,0 +1 @@
export { default as appendImageTransformationParameters } from './appendImageTransformationParameters'

View File

@@ -1,13 +1,2 @@
import { StorageImageTransformationParams } from './types'
export * from './appendImageTransformationParameters'
export * from './types'
export const appendImageTransformationParameters = (
url: string,
params: StorageImageTransformationParams
): string => {
const queryParameters = Object.entries(params)
.map(([key, value]) => `${key.charAt(0)}=${value}`)
.join('&')
return queryParameters ? `${url}?${queryParameters}` : url
}

View File

@@ -65,9 +65,7 @@ export interface StorageGetUrlParams extends StorageImageTransformationParams {
fileId: string
}
// TODO not implemented yet in hasura-storage
// export interface StorageGetPresignedUrlParams extends StorageImageTransformationParams {
export interface StorageGetPresignedUrlParams {
export interface StorageGetPresignedUrlParams extends StorageImageTransformationParams {
fileId: string
}

View File

@@ -0,0 +1,15 @@
import { defineConfig } from 'vite'
import baseConfig from '../../config/vite.lib.config'
const PWD = process.env.PWD
export default defineConfig({
...baseConfig,
test: {
...(baseConfig.test || {}),
testTimeout: 30000,
environment: 'node',
include: [`${PWD}/src/**/*.{spec,test}.{ts,tsx}`]
}
})

View File

@@ -1,5 +1,18 @@
# @nhost/nextjs
## 1.13.17
### Patch Changes
- @nhost/react@2.0.11
## 1.13.16
### Patch Changes
- ce1ee40d: fix(nextjs): allow `subdomain`, `region` and service URLs
- @nhost/react@2.0.10
## 1.13.15
### Patch Changes

View File

@@ -70,7 +70,10 @@ import {
} from '@nhost/nextjs'
export async function getServerSideProps(context: NextPageContext) {
const nhostSession = await getNhostSession('<Your Nhost Backend URL>', context)
const nhostSession = await getNhostSession(
{ subdomain: '<project_subdomain>', region: '<project_region>' },
context
)
return {
props: {

View File

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

View File

@@ -1,6 +1,7 @@
import {
AuthMachine,
NhostClient,
NhostReactClientConstructorParams,
NhostSession,
NHOST_REFRESH_TOKEN_KEY,
VanillaNhostClient
@@ -11,21 +12,42 @@ import { StateFrom } from 'xstate'
import { waitFor } from 'xstate/lib/waitFor'
import { NHOST_SESSION_KEY } from './utils'
export type CreateServerSideClientParams = Pick<
NhostReactClientConstructorParams,
'subdomain' | 'region' | 'authUrl' | 'functionsUrl' | 'graphqlUrl' | 'storageUrl'
>
/**
* Creates an Nhost client that runs on the server side.
* It will try to get the refesh token in cookies, or from the request URL
* If a refresh token is found, it uses it to get an up to date access token (JWT) and a user session
* This method resolves when the authentication status is known eventually
* @param backendUrl
* @param context
* @param config - An object containing connection information
* @param context - Server side context
* @returns instance of `NhostClient` that is ready to use on the server side (signed in or signed out)
*/
export const createServerSideClient = async (
backendUrl: string,
params: string | CreateServerSideClientParams,
context: GetServerSidePropsContext
): Promise<NhostClient> => {
let clientParams: NhostReactClientConstructorParams
if (typeof params === 'string') {
console.warn(
'Deprecation Notice: Backend URL is no longer supported. Please use subdomain + region or individual service URLs.'
)
clientParams = {
backendUrl: params
}
} else {
clientParams = {
...params
}
}
const nhost = new VanillaNhostClient({
backendUrl,
...clientParams,
clientStorageType: 'custom',
clientStorage: {
getItem: (key) => {

View File

@@ -1,6 +1,6 @@
import { NhostSession } from '@nhost/react'
import { GetServerSidePropsContext } from 'next'
import { createServerSideClient } from './create-server-side-client'
import { createServerSideClient, CreateServerSideClientParams } from './create-server-side-client'
/**
* Refreshes the access token if there is any and returns the Nhost session.
@@ -10,7 +10,10 @@ import { createServerSideClient } from './create-server-side-client'
*
* ```js
* export const getServerSideProps: GetServerSideProps = async (context) => {
* const nhostSession = await getNhostSession(BACKEND_URL, context)
* const nhostSession = await getNhostSession(
* { subdomain: '<project_subdomain>', region: '<project_region>' },
* context
* )
*
* return {
* props: {
@@ -25,7 +28,10 @@ import { createServerSideClient } from './create-server-side-client'
*
* ```js
* export async function getServerSideProps(context: GetServerSidePropsContext) { // or NextPageContext
* const nhostSession = await getNhostSession(BACKEND_URL, context)
* const nhostSession = await getNhostSession(
* { subdomain: '<project_subdomain>', region: '<project_region>' },
* context
* )
*
* return {
* props: {
@@ -40,10 +46,10 @@ import { createServerSideClient } from './create-server-side-client'
* @returns Nhost session
*/
export const getNhostSession = async (
backendUrl: string,
params: string | CreateServerSideClientParams,
context: GetServerSidePropsContext
): Promise<NhostSession | null> => {
const nhost = await createServerSideClient(backendUrl, context)
const nhost = await createServerSideClient(params, context)
const { accessToken, refreshToken, user } = nhost.auth.client.interpreter!.getSnapshot().context
return nhost.auth.isAuthenticated()
? {

View File

@@ -1,5 +1,23 @@
# @nhost/nhost-js
## 2.1.1
### Patch Changes
- Updated dependencies [614f213e]
- @nhost/hasura-storage-js@2.0.4
## 2.1.0
### Minor Changes
- bfb4c1a6: chore(sdk): remove deprecated `useAxios` property
### Patch Changes
- Updated dependencies [bfb4c1a6]
- @nhost/graphql-js@0.1.0
## 2.0.9
### Patch Changes

View File

@@ -0,0 +1,10 @@
{
"title": "Nhost JS",
"path": "./.docgen/nhost-js.json",
"output": "../../docs/docs/reference/docgen/javascript/nhost-js",
"root": "reference/docgen/javascript/nhost-js",
"slug": "/reference/javascript/nhost-js",
"sidebarConfig": "referenceSidebar",
"baseEditUrl": "https://github.com/nhost/nhost/edit/main/packages",
"cleanup": true
}

View File

@@ -0,0 +1,25 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": ["src/index.ts"],
"exclude": ["*.(spec|test).tsx?"],
"sort": ["source-order"],
"json": "./.docgen/nhost-js.json",
"name": "Nhost JS",
"readme": "none",
"githubPages": false,
"cleanOutputDir": false,
"excludeInternal": true,
"excludePrivate": true,
"compilerOptions": {
"rootDir": "../..",
"paths": {
"@nhost/apollo": ["../../integrations/apollo/src/index.ts"],
"@nhost/hasura-auth-js": ["../hasura-auth-js/src/index.ts"],
"@nhost/hasura-storage-js": ["../hasura-storage-js/src/index.ts"],
"@nhost/nhost-js": ["../nhost-js/src/index.ts"],
"@nhost/nextjs": ["../nextjs/src/index.ts"],
"@nhost/react": ["../react/src/index.ts"],
"@nhost/react-apollo": ["../../integrations/react-apollo/src/index.ts"]
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/nhost-js",
"version": "2.0.9",
"version": "2.1.1",
"description": "Nhost JavaScript SDK",
"license": "MIT",
"keywords": [
@@ -55,7 +55,9 @@
"lint": "eslint . --ext .ts,.tsx",
"lint:fix": "eslint . --ext .ts,.tsx --fix",
"verify": "run-p prettier lint",
"verify:fix": "run-p prettier:fix lint:fix"
"verify:fix": "run-p prettier:fix lint:fix",
"typedoc": "typedoc --options ./nhost-js.typedoc.json --tsconfig ./typedoc.tsconfig.json",
"docgen": "pnpm typedoc && docgen --config ./nhost-js.docgen.json"
},
"dependencies": {
"@nhost/graphql-js": "workspace:*",
@@ -64,6 +66,7 @@
"isomorphic-unfetch": "^3.1.0"
},
"devDependencies": {
"@nhost/docgen": "workspace:*",
"graphql": "16.6.0"
},
"peerDependencies": {

View File

@@ -38,12 +38,6 @@ export class NhostFunctionsClient {
this.adminSecret = adminSecret
}
async call<T = unknown, D = any>(
url: string,
data: D | null,
config?: NhostFunctionCallConfig
): Promise<NhostFunctionCallResponse<T>>
/**
* Use `nhost.functions.call` to call (sending a POST request to) a serverless function.
*

View File

@@ -28,6 +28,4 @@ export type NhostFunctionCallResponse<T = unknown> =
/** Subset of RequestInit parameters that are supported by the functions client */
export interface NhostFunctionCallConfig {
headers?: Record<string, string>
/** @deprecated Axios has been replaced by cross-fetch. You should now remove this option. */
useAxios?: false
}

View File

@@ -6,7 +6,7 @@ import { NhostClientConstructorParams } from '../utils/types'
/**
* Creates a client for Storage from either a subdomain or a URL
*/
export function createStorageClient(params: NhostClientConstructorParams<undefined>) {
export function createStorageClient(params: NhostClientConstructorParams) {
const storageUrl =
'subdomain' in params || 'backendUrl' in params
? urlFromSubdomain(params, 'storage')

View File

@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"paths": {}
}
}

View File

@@ -1,5 +1,18 @@
# @nhost/react
## 2.0.11
### Patch Changes
- @nhost/nhost-js@2.1.1
## 2.0.10
### Patch Changes
- Updated dependencies [bfb4c1a6]
- @nhost/nhost-js@2.1.0
## 2.0.9
### Patch Changes

View File

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

View File

@@ -1,5 +1,18 @@
# @nhost/vue
## 1.13.17
### Patch Changes
- @nhost/nhost-js@2.1.1
## 1.13.16
### Patch Changes
- Updated dependencies [bfb4c1a6]
- @nhost/nhost-js@2.1.0
## 1.13.15
### Patch Changes

View File

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

129
pnpm-lock.yaml generated
View File

@@ -86,8 +86,8 @@ importers:
'@emotion/styled': ^11.10.5
'@fontsource/inter': ^4.5.14
'@fontsource/roboto-mono': ^4.5.8
'@graphiql/react': ^0.15.0
'@graphiql/toolkit': ^0.8.0
'@graphiql/react': ^0.17.0
'@graphiql/toolkit': ^0.8.2
'@graphql-codegen/cli': ^3.0.0
'@graphql-codegen/typescript': ^3.0.0
'@graphql-codegen/typescript-graphql-request': ^4.5.1
@@ -113,7 +113,7 @@ importers:
'@storybook/manager-webpack5': ^6.5.14
'@storybook/react': ^6.5.14
'@storybook/testing-library': ^0.0.13
'@stripe/react-stripe-js': ^1.10.0
'@stripe/react-stripe-js': ^2.0.0
'@stripe/stripe-js': ^1.35.0
'@tailwindcss/forms': ^0.5.3
'@tanstack/react-query': ^4.16.1
@@ -154,7 +154,7 @@ importers:
eslint-plugin-react: ^7.31.11
eslint-plugin-react-hooks: ^4.6.0
generate-password: ^1.7.0
graphiql: ^2.2.0
graphiql: ^2.4.0
graphql: 16.6.0
graphql-request: ^4.3.0
graphql-tag: ^2.12.6
@@ -212,8 +212,8 @@ importers:
'@emotion/styled': 11.10.5_4ahanhknrtlidghakifap67h7q
'@fontsource/inter': 4.5.14
'@fontsource/roboto-mono': 4.5.8
'@graphiql/react': 0.15.0_755ntyjuho6qjwic26h62or3by
'@graphiql/toolkit': 0.8.0_7fbl5omhlrpwpn5f5culy6mafe
'@graphiql/react': 0.17.0_755ntyjuho6qjwic26h62or3by
'@graphiql/toolkit': 0.8.2_7fbl5omhlrpwpn5f5culy6mafe
'@headlessui/react': 1.7.4_biqbaboplfbrettd7655fr4n2y
'@heroicons/react': 1.0.6_react@18.2.0
'@hookform/resolvers': 2.9.10_react-hook-form@7.42.1
@@ -224,7 +224,7 @@ importers:
'@nhost/nextjs': link:../packages/nextjs
'@nhost/react-apollo': link:../integrations/react-apollo
'@segment/snippet': 4.15.3
'@stripe/react-stripe-js': 1.14.2_mljfwq7caaxrtdqn7u72ntpebq
'@stripe/react-stripe-js': 2.0.0_mljfwq7caaxrtdqn7u72ntpebq
'@stripe/stripe-js': 1.44.1
'@tailwindcss/forms': 0.5.3_tailwindcss@3.2.1
'@tanstack/react-query': 4.16.1_biqbaboplfbrettd7655fr4n2y
@@ -235,7 +235,7 @@ importers:
clsx: 1.2.1
date-fns: 2.29.3
generate-password: 1.7.0
graphiql: 2.2.0_755ntyjuho6qjwic26h62or3by
graphiql: 2.4.0_755ntyjuho6qjwic26h62or3by
graphql: 16.6.0
graphql-request: 4.3.0_rjjjs2nwgns3bcvnnqb5eu5nry
graphql-tag: 2.12.6_graphql@16.6.0
@@ -1020,6 +1020,7 @@ importers:
packages/nhost-js:
specifiers:
'@nhost/docgen': workspace:*
'@nhost/graphql-js': workspace:*
'@nhost/hasura-auth-js': workspace:*
'@nhost/hasura-storage-js': workspace:*
@@ -1031,6 +1032,7 @@ importers:
'@nhost/hasura-storage-js': link:../hasura-storage-js
isomorphic-unfetch: 3.1.0
devDependencies:
'@nhost/docgen': link:../docgen
graphql: 16.6.0
packages/react:
@@ -6451,25 +6453,26 @@ packages:
/@gqty/utils/1.0.0:
resolution: {integrity: sha512-QJMlzts//d0H5mlekOZgx1a4KsTYXfxmRhhx8g/8mvzdaNVPxhFzCsv3+ljTOzbW3A08qy4jXQPWAMoTefSJDQ==}
/@graphiql/react/0.15.0_755ntyjuho6qjwic26h62or3by:
resolution: {integrity: sha512-kJqkdf6d4Cck05Wt5yCDZXWfs7HZgcpuoWq/v8nOa698qVaNMM3qdG4CpRsZEexku0DSSJzWWuanxd5x+sRcFg==}
/@graphiql/react/0.17.0_755ntyjuho6qjwic26h62or3by:
resolution: {integrity: sha512-mn8FfucLJzFLQQ5OoJ9U1Dvnva1smOxBL89D2TSM2B6mmDyQIRhFXmjzUTPdsqwpauFiqkDaQZiqX7T/ZPrg/w==}
peerDependencies:
graphql: ^15.5.0 || ^16.0.0
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
dependencies:
'@graphiql/toolkit': 0.8.0_7fbl5omhlrpwpn5f5culy6mafe
'@graphiql/toolkit': 0.8.2_7fbl5omhlrpwpn5f5culy6mafe
'@reach/combobox': 0.17.0_biqbaboplfbrettd7655fr4n2y
'@reach/dialog': 0.17.0_zula6vjvt3wdocc4mwcxqa6nzi
'@reach/listbox': 0.17.0_biqbaboplfbrettd7655fr4n2y
'@reach/menu-button': 0.17.0_7i5myeigehqah43i5u7wbekgba
'@reach/tooltip': 0.17.0_biqbaboplfbrettd7655fr4n2y
'@reach/visually-hidden': 0.17.0_biqbaboplfbrettd7655fr4n2y
clsx: 1.2.1
codemirror: 5.65.9
codemirror-graphql: 2.0.2_xqvzjd2jznjsrt45ytiwcf3lei
codemirror-graphql: 2.0.4_xqvzjd2jznjsrt45ytiwcf3lei
copy-to-clipboard: 3.3.3
graphql: 16.6.0
graphql-language-service: 5.1.0_graphql@16.6.0
graphql-language-service: 5.1.2_graphql@16.6.0
markdown-it: 12.3.2
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
@@ -6482,8 +6485,8 @@ packages:
- react-is
dev: false
/@graphiql/toolkit/0.8.0_7fbl5omhlrpwpn5f5culy6mafe:
resolution: {integrity: sha512-DbMFhEKejpPzB6k8W3Mj+Rl8geXiw49USDF9Wdi06EEk1XLVh1iebDqveYY+4lViITsV4+BeGikxlqi8umfP4g==}
/@graphiql/toolkit/0.8.2_7fbl5omhlrpwpn5f5culy6mafe:
resolution: {integrity: sha512-FGtXBYTzcPuwfpaC+0BGeriLD6kwTdcF5xugGvjutk5J93Dgy2vw+SkBdbi1QGzz/jooETi1kEtFeDuWTzIG7Q==}
peerDependencies:
graphql: ^15.5.0 || ^16.0.0
graphql-ws: '>= 4.5.0'
@@ -6494,7 +6497,7 @@ packages:
'@n1ru4l/push-pull-async-iterable-iterator': 3.2.0
graphql: 16.6.0
graphql-ws: 5.11.2_graphql@16.6.0
meros: 1.2.0_@types+node@16.18.11
meros: 1.2.1_@types+node@16.18.11
transitivePeerDependencies:
- '@types/node'
dev: false
@@ -7845,7 +7848,7 @@ packages:
graphql: 16.6.0
graphql-ws: 5.11.2_graphql@16.6.0
isomorphic-ws: 5.0.0_ws@8.11.0
meros: 1.2.0_@types+node@16.18.11
meros: 1.2.1_@types+node@16.18.11
tslib: 2.5.0
value-or-promise: 1.0.12
ws: 8.11.0
@@ -7873,7 +7876,7 @@ packages:
graphql: 16.6.0
graphql-ws: 5.11.2_graphql@16.6.0
isomorphic-ws: 5.0.0_ws@8.11.0
meros: 1.2.0_@types+node@18.11.17
meros: 1.2.1_@types+node@18.11.17
tslib: 2.5.0
value-or-promise: 1.0.12
ws: 8.11.0
@@ -7901,7 +7904,7 @@ packages:
graphql: 16.6.0
graphql-ws: 5.11.2_graphql@16.6.0
isomorphic-ws: 5.0.0_ws@8.11.0
meros: 1.2.0
meros: 1.2.1
tslib: 2.5.0
value-or-promise: 1.0.12
ws: 8.11.0
@@ -7929,7 +7932,7 @@ packages:
graphql: 16.6.0
graphql-ws: 5.11.2_graphql@16.6.0
isomorphic-ws: 5.0.0_ws@8.11.0
meros: 1.2.0_@types+node@16.18.11
meros: 1.2.1_@types+node@16.18.11
tslib: 2.5.0
value-or-promise: 1.0.12
ws: 8.11.0
@@ -11545,10 +11548,10 @@ packages:
resolve-from: 5.0.0
dev: true
/@stripe/react-stripe-js/1.14.2_mljfwq7caaxrtdqn7u72ntpebq:
resolution: {integrity: sha512-8dGBdSFldq6dyiYgv3r4tOwS5PGAO/446hodegSKlmWg7NkAl0McopszXJd11A9otGi47v5OzCsljyfHJgnLhw==}
/@stripe/react-stripe-js/2.0.0_mljfwq7caaxrtdqn7u72ntpebq:
resolution: {integrity: sha512-JEzZlVdJaU9g3sZIcgCUXfHqvmDGF2pBqDVWxTJLAhSBNARp5kyFEoTFQzeCdPwrq3D4ZMJVgc6i6mbUgiXsgQ==}
peerDependencies:
'@stripe/stripe-js': ^1.42.1
'@stripe/stripe-js': ^1.44.1
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
dependencies:
@@ -15040,7 +15043,7 @@ packages:
/axios/0.25.0_debug@4.3.4:
resolution: {integrity: sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==}
dependencies:
follow-redirects: 1.15.2_debug@4.3.4
follow-redirects: 1.15.2
transitivePeerDependencies:
- debug
dev: true
@@ -16253,8 +16256,8 @@ packages:
resolution: {integrity: sha512-NiujjUFB4SwScJq2bwbYUtXbZhBSlY6vYzm++3Q6oC+U+injTqfPYFK8wS9COOmb2lueqp0ZRB4nK1VYeHgNyw==}
dev: true
/codemirror-graphql/2.0.2_xqvzjd2jznjsrt45ytiwcf3lei:
resolution: {integrity: sha512-9c1cItR+8lG7thmTnDDQ3zI8YesNKiFCp2BnLFkYWCtdhSSuCUHebU/Vurew6ayyUl8MBCldNx3Ev66QAWM5Kw==}
/codemirror-graphql/2.0.4_xqvzjd2jznjsrt45ytiwcf3lei:
resolution: {integrity: sha512-u68lfUJv4hESfIZLJUGSWU2+txNrfoT29EEMxNksDBPXjnF41Ivpp/r8rxJBXigNcDOBmjMfKfs1J4L0Jggwrg==}
peerDependencies:
'@codemirror/language': 6.0.0
codemirror: ^5.65.3
@@ -16263,7 +16266,7 @@ packages:
'@codemirror/language': 6.3.1
codemirror: 5.65.9
graphql: 16.6.0
graphql-language-service: 5.0.6_graphql@16.6.0
graphql-language-service: 5.1.2_graphql@16.6.0
dev: false
/codemirror/5.65.9:
@@ -20300,19 +20303,6 @@ packages:
peerDependenciesMeta:
debug:
optional: true
dev: false
/follow-redirects/1.15.2_debug@4.3.4:
resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==}
engines: {node: '>=4.0'}
peerDependencies:
debug: '*'
peerDependenciesMeta:
debug:
optional: true
dependencies:
debug: 4.3.4
dev: true
/for-each/0.3.3:
resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==}
@@ -21029,18 +21019,18 @@ packages:
resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==}
dev: true
/graphiql/2.2.0_755ntyjuho6qjwic26h62or3by:
resolution: {integrity: sha512-w1ujpCKMlkwkoUjeg0HpRiBBTm1WHAjHNkFv1TbMu6trjzz63mQ48GLZlmyQY1yhwmc+diCcvmmAt+AyvKLWWA==}
/graphiql/2.4.0_755ntyjuho6qjwic26h62or3by:
resolution: {integrity: sha512-lJ6OYDQkhAMZePrz8g6r9vMVmxa4SY9eEzzyJxsgE+jA+6PFKds2e8/tDAaCYfX0HNv84nc7W/th1vsHIdgYiA==}
peerDependencies:
graphql: ^15.5.0 || ^16.0.0
react: ^16.8.0 || ^17.0.0 || ^18.0.0
react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0
dependencies:
'@graphiql/react': 0.15.0_755ntyjuho6qjwic26h62or3by
'@graphiql/toolkit': 0.8.0_7fbl5omhlrpwpn5f5culy6mafe
'@graphiql/react': 0.17.0_755ntyjuho6qjwic26h62or3by
'@graphiql/toolkit': 0.8.2_7fbl5omhlrpwpn5f5culy6mafe
entities: 2.2.0
graphql: 16.6.0
graphql-language-service: 5.1.0_graphql@16.6.0
graphql-language-service: 5.1.2_graphql@16.6.0
markdown-it: 12.3.2
react: 18.2.0
react-dom: 18.2.0_react@18.2.0
@@ -21204,19 +21194,8 @@ packages:
- utf-8-validate
dev: true
/graphql-language-service/5.0.6_graphql@16.6.0:
resolution: {integrity: sha512-FjE23aTy45Lr5metxCv3ZgSKEZOzN7ERR+OFC1isV5mHxI0Ob8XxayLTYjQKrs8b3kOpvgTYmSmu6AyXOzYslg==}
hasBin: true
peerDependencies:
graphql: ^15.5.0 || ^16.0.0
dependencies:
graphql: 16.6.0
nullthrows: 1.1.1
vscode-languageserver-types: 3.17.2
dev: false
/graphql-language-service/5.1.0_graphql@16.6.0:
resolution: {integrity: sha512-APffigZ/l2me6soek+Yq5Us3HBwmfw4vns4QoqsTePXkK3knVO8rn0uAC6PmTyglb1pmFFPbYaRIzW4wmcnnGQ==}
/graphql-language-service/5.1.2_graphql@16.6.0:
resolution: {integrity: sha512-oeuztbvd7fwKWZ/GCp0voqgctdIL4BDjTkd/phz1jEyH+pfj6inJWKKIkUJPW5ebWHx+mFsZ00wdE6tiCvW2fA==}
hasBin: true
peerDependencies:
graphql: ^15.5.0 || ^16.0.0
@@ -24032,39 +24011,6 @@ packages:
uuid: 9.0.0
dev: false
/meros/1.2.0:
resolution: {integrity: sha512-3QRZIS707pZQnijHdhbttXRWwrHhZJ/gzolneoxKVz9N/xmsvY/7Ls8lpnI9gxbgxjcHsAVEW3mgwiZCo6kkJQ==}
engines: {node: '>=12'}
peerDependencies:
'@types/node': '>=12'
peerDependenciesMeta:
'@types/node':
optional: true
dev: true
/meros/1.2.0_@types+node@16.18.11:
resolution: {integrity: sha512-3QRZIS707pZQnijHdhbttXRWwrHhZJ/gzolneoxKVz9N/xmsvY/7Ls8lpnI9gxbgxjcHsAVEW3mgwiZCo6kkJQ==}
engines: {node: '>=12'}
peerDependencies:
'@types/node': '>=12'
peerDependenciesMeta:
'@types/node':
optional: true
dependencies:
'@types/node': 16.18.11
/meros/1.2.0_@types+node@18.11.17:
resolution: {integrity: sha512-3QRZIS707pZQnijHdhbttXRWwrHhZJ/gzolneoxKVz9N/xmsvY/7Ls8lpnI9gxbgxjcHsAVEW3mgwiZCo6kkJQ==}
engines: {node: '>=12'}
peerDependencies:
'@types/node': '>=12'
peerDependenciesMeta:
'@types/node':
optional: true
dependencies:
'@types/node': 18.11.17
dev: true
/meros/1.2.1:
resolution: {integrity: sha512-R2f/jxYqCAGI19KhAvaxSOxALBMkaXWH2a7rOyqQw+ZmizX5bKkEYWLzdhC+U82ZVVPVp6MCXe3EkVligh+12g==}
engines: {node: '>=13'}
@@ -24085,7 +24031,6 @@ packages:
optional: true
dependencies:
'@types/node': 16.18.11
dev: true
/meros/1.2.1_@types+node@18.11.17:
resolution: {integrity: sha512-R2f/jxYqCAGI19KhAvaxSOxALBMkaXWH2a7rOyqQw+ZmizX5bKkEYWLzdhC+U82ZVVPVp6MCXe3EkVligh+12g==}