Compare commits
41 Commits
@nhost/str
...
@nhost/str
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7692abf98c | ||
|
|
4e0aafbf08 | ||
|
|
5f18361d4a | ||
|
|
09fe573bff | ||
|
|
b7396c3b02 | ||
|
|
aa177677b5 | ||
|
|
c922de7b0c | ||
|
|
38526d7ef2 | ||
|
|
057c8be55a | ||
|
|
4783657986 | ||
|
|
e3606c091f | ||
|
|
d5489b71ec | ||
|
|
a6bc3091a2 | ||
|
|
01a086cd05 | ||
|
|
a8cc2e0c9b | ||
|
|
11f0a1493d | ||
|
|
8eafa19810 | ||
|
|
1e31a9567d | ||
|
|
c6120bfca1 | ||
|
|
4c37cc5bc2 | ||
|
|
66ef8f91a3 | ||
|
|
3f135abed9 | ||
|
|
9f127f3333 | ||
|
|
f9b164baa3 | ||
|
|
73804c8450 | ||
|
|
537259e00b | ||
|
|
94d7703f9b | ||
|
|
c24207eeea | ||
|
|
54057ffe8a | ||
|
|
0e9052e810 | ||
|
|
3a209a8ee3 | ||
|
|
f26d38a0f1 | ||
|
|
0e06259e24 | ||
|
|
ce7d81c6d3 | ||
|
|
3779772c99 | ||
|
|
c657cb85cf | ||
|
|
46dfa9634c | ||
|
|
13f5531b7e | ||
|
|
0ecff620fb | ||
|
|
0470e65a38 | ||
|
|
f031cf9463 |
13
.github/CODEOWNERS
vendored
13
.github/CODEOWNERS
vendored
@@ -1,8 +1,13 @@
|
||||
# Documentation
|
||||
# https://help.github.com/en/articles/about-code-owners
|
||||
|
||||
/packages @plmercereau
|
||||
/packages @plmercereau @szilarddoro
|
||||
/packages/docgen @szilarddoro
|
||||
/.github/workflows @plmercereau
|
||||
/docs/ @guicurcio
|
||||
/examples/ @plmercereau @guicurcio @FuzzyReason
|
||||
/packages/stripe-graphql-js @elitan
|
||||
/.github @plmercereau
|
||||
/docs/ @guicurcio @elitan
|
||||
/config/ @plmercereau @szilarddoro
|
||||
/examples/ @plmercereau
|
||||
/examples/codegen-react-apollo @elitan @plmercereau
|
||||
/examples/codegen-react-query @elitan @plmercereau
|
||||
/examples/react-apollo-crm @elitan @plmercereau
|
||||
|
||||
45
README.md
45
README.md
@@ -219,6 +219,13 @@ Here are some ways of contributing to making Nhost better:
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/ejkkan">
|
||||
<img src="https://avatars.githubusercontent.com/u/32518962?v=4" width="100;" alt="ejkkan"/>
|
||||
<br />
|
||||
<sub><b>Erik Magnusson</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/macmac49">
|
||||
<img src="https://avatars.githubusercontent.com/u/831190?v=4" width="100;" alt="macmac49"/>
|
||||
@@ -253,15 +260,15 @@ Here are some ways of contributing to making Nhost better:
|
||||
<br />
|
||||
<sub><b>David Barroso</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/hajek-raven">
|
||||
<img src="https://avatars.githubusercontent.com/u/7288737?v=4" width="100;" alt="hajek-raven"/>
|
||||
<br />
|
||||
<sub><b>Filip Hájek</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/MelodicCrypter">
|
||||
<img src="https://avatars.githubusercontent.com/u/18341500?v=4" width="100;" alt="MelodicCrypter"/>
|
||||
@@ -296,15 +303,15 @@ Here are some ways of contributing to making Nhost better:
|
||||
<br />
|
||||
<sub><b>Nicolas Bourdin</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Savinvadim1312">
|
||||
<img src="https://avatars.githubusercontent.com/u/16936043?v=4" width="100;" alt="Savinvadim1312"/>
|
||||
<br />
|
||||
<sub><b>Savin Vadim</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Svarto">
|
||||
<img src="https://avatars.githubusercontent.com/u/24279217?v=4" width="100;" alt="Svarto"/>
|
||||
@@ -339,15 +346,15 @@ Here are some ways of contributing to making Nhost better:
|
||||
<br />
|
||||
<sub><b>Animesh Pathak</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/rustyb">
|
||||
<img src="https://avatars.githubusercontent.com/u/53086?v=4" width="100;" alt="rustyb"/>
|
||||
<br />
|
||||
<sub><b>Colin Broderick</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/dminkovsky">
|
||||
<img src="https://avatars.githubusercontent.com/u/218725?v=4" width="100;" alt="dminkovsky"/>
|
||||
@@ -382,15 +389,15 @@ Here are some ways of contributing to making Nhost better:
|
||||
<br />
|
||||
<sub><b>Hoang Do</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/eltociear">
|
||||
<img src="https://avatars.githubusercontent.com/u/22633385?v=4" width="100;" alt="eltociear"/>
|
||||
<br />
|
||||
<sub><b>Ikko Ashimine</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/jladuval">
|
||||
<img src="https://avatars.githubusercontent.com/u/1935359?v=4" width="100;" alt="jladuval"/>
|
||||
@@ -398,13 +405,6 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Jacob Duval</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/kylehayes">
|
||||
<img src="https://avatars.githubusercontent.com/u/509932?v=4" width="100;" alt="kylehayes"/>
|
||||
<br />
|
||||
<sub><b>Kyle Hayes</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/leothorp">
|
||||
<img src="https://avatars.githubusercontent.com/u/12928449?v=4" width="100;" alt="leothorp"/>
|
||||
@@ -448,6 +448,13 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Quentin Decré</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/altschuler">
|
||||
<img src="https://avatars.githubusercontent.com/u/956928?v=4" width="100;" alt="altschuler"/>
|
||||
<br />
|
||||
<sub><b>Simon Altschuler</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/atapas">
|
||||
<img src="https://avatars.githubusercontent.com/u/3633137?v=4" width="100;" alt="atapas"/>
|
||||
|
||||
@@ -12,11 +12,15 @@ Nhost Authentication lets you authenticate users using different sign-in methods
|
||||
- [Email and Password](/platform/authentication/sign-in-with-email-and-password)
|
||||
- [Magic Link](/platform/authentication/sign-in-with-magic-link)
|
||||
- [Phone Number (SMS)](/platform/authentication/sign-in-with-phone-number-sms)
|
||||
- [Google](/platform/authentication/sign-in-with-google)
|
||||
- [Security Keys (WebAuthn)](/platform/authentication/sign-in-with-phone-number-sms)
|
||||
- [Apple](/platform/authentication/sign-in-with-apple)
|
||||
- [Discord](/platform/authentication/sign-in-with-discord)
|
||||
- [Facebook](/platform/authentication/sign-in-with-facebook)
|
||||
- [GitHub](/platform/authentication/sign-in-with-github)
|
||||
- [Google](/platform/authentication/sign-in-with-google)
|
||||
- [LinkedIn](/platform/authentication/sign-in-with-linkedin)
|
||||
- [Spotify](/platform/authentication/sign-in-with-spotify)
|
||||
- [Twitch](/platform/authentication/sign-in-with-twitch)
|
||||
|
||||
## How it works
|
||||
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
---
|
||||
title: Sign In with Security Keys
|
||||
sidebar_label: Security Keys
|
||||
slug: /platform/authentication/sign-in-with-security-keys
|
||||
---
|
||||
|
||||
Follow this guide to sign in users with security keys and the WebAuthn API.
|
||||
|
||||
Examples of security keys:
|
||||
|
||||
- [Windows Hello](https://support.microsoft.com/en-us/windows/learn-about-windows-hello-and-set-it-up-dae28983-8242-bb2a-d3d1-87c9d265a5f0)
|
||||
- [Apple Touch ID](https://support.apple.com/en-us/HT201371)
|
||||
- [Apple Face ID](https://support.apple.com/en-us/HT208109)
|
||||
- [Yubico security keys](https://www.yubico.com/)
|
||||
- Android Fingerprint sensors
|
||||
|
||||
You can read more about this feature in our [blog post](https://nhost.io/blog/webauthn-sign-in-method)
|
||||
|
||||
## Setup
|
||||
|
||||
Enable the Security Key sign-in method in the Nhost dashboard under **Users** -> **Authentication Settings** -> **Security Keys**.
|
||||
|
||||
You need to make sure you also set a valid client URL under **Users** -> **Authentication Settings** -> **Client URL**.
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true" style={{ marginBottom: '15px' }}>
|
||||
<source src="/videos/enable-security-keys-sign-in.mp4" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
## Sign Up
|
||||
|
||||
Signing up with a security key uses the same method as signing up with an email and a password. Instead of a `password` parameter, you need to set the `securityKey` parameter to `true`:
|
||||
|
||||
```tsx
|
||||
const { error, session } = await nhost.auth.signUp({
|
||||
email: 'joe@example.com',
|
||||
securityKey: true
|
||||
})
|
||||
if (error) {
|
||||
// Something unexpected happened, for instance, the user canceled their registration
|
||||
console.log(error)
|
||||
} else if (session) {
|
||||
// Sign up is complete!
|
||||
console.log(session.user)
|
||||
} else {
|
||||
console.log(
|
||||
'You need to verify your email address by clicking the link in the email we sent you.'
|
||||
)
|
||||
}
|
||||
```
|
||||
|
||||
## Sign In
|
||||
|
||||
Once a user added a security key, they can use it to sign in:
|
||||
|
||||
```tsx
|
||||
const { error, session } = await nhost.auth.signIn({
|
||||
email,
|
||||
securityKey: true
|
||||
})
|
||||
if (session) {
|
||||
// User is signed in
|
||||
} else {
|
||||
// Something unexpected happened
|
||||
console.log(error)
|
||||
}
|
||||
```
|
||||
|
||||
## Add a Security Key
|
||||
|
||||
Any signed-in user with a valid email can add a security key when the feature is enabled. For instance, someone who signed up with an email and a password can add a security key and thus use it for their later sign-in!
|
||||
|
||||
Users can use multiple devices to sign in to their account. They can add as many security keys as they like.
|
||||
|
||||
```tsx
|
||||
const { key, error } = await nhost.auth.addSecurityKey()
|
||||
if (key) {
|
||||
// Successfully added a new security key
|
||||
console.log(key.id)
|
||||
} else {
|
||||
// Somethine unexpected happened
|
||||
console.log(error)
|
||||
}
|
||||
```
|
||||
|
||||
A nickname can be added for each security key to make them easy to identify:
|
||||
|
||||
```tsx
|
||||
await nhost.auth.addSecurityKey('my macbook')
|
||||
```
|
||||
|
||||
## List or Remove Security Keys
|
||||
|
||||
To list and to remove security keys can be achieved over GraphQL after setting the correct Hasura permissions to the `auth.security_keys` table:
|
||||
|
||||
```graphql
|
||||
query securityKeys($userId: uuid!) {
|
||||
authUserSecurityKeys(where: { userId: { _eq: $userId } }) {
|
||||
id
|
||||
nickname
|
||||
}
|
||||
}
|
||||
mutation removeSecurityKey($id: uuid!) {
|
||||
deleteAuthUserSecurityKey(id: $id) {
|
||||
id
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -9,49 +9,12 @@ Nhost Authentication support the following sign-in methods:
|
||||
- [Email and Password](/platform/authentication/sign-in-with-email-and-password)
|
||||
- [Magic Link](/platform/authentication/sign-in-with-magic-link)
|
||||
- [Phone Number (SMS)](/platform/authentication/sign-in-with-phone-number-sms)
|
||||
- [Google](/platform/authentication/sign-in-with-google)
|
||||
- [Security Keys (WebAuthn)](/platform/authentication/sign-in-with-phone-number-sms)
|
||||
- [Apple](/platform/authentication/sign-in-with-apple)
|
||||
- [Discord](/platform/authentication/sign-in-with-discord)
|
||||
- [Facebook](/platform/authentication/sign-in-with-facebook)
|
||||
- [GitHub](/platform/authentication/sign-in-with-github)
|
||||
- [Google](/platform/authentication/sign-in-with-google)
|
||||
- [LinkedIn](/platform/authentication/sign-in-with-linkedin)
|
||||
- [Spotify](/platform/authentication/sign-in-with-spotify)
|
||||
|
||||
## Enabling Social Sign-In Provider
|
||||
|
||||
To start with social sign-in, select your project in Nhost Dashboard and go to **Users** → **Authentication Settings**.
|
||||
|
||||
You need to set the Client ID and Client Secret for each provider that you want to enable.
|
||||
|
||||
## Implementing sign-in experience
|
||||
|
||||
Use the [Nhost JavaScript SDK](/reference/javascript) and the `signIn()` method to implement social sign-in for your project.
|
||||
|
||||
Here's an example of how to implement sign-in with GitHub:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
provider: 'github'
|
||||
})
|
||||
```
|
||||
|
||||
Users are redirected to your Nhost project's **client URL** by default. By default, your Nhost project's client URL is set to `http://localhost:3000`. You can change the value of your client URL in the Nhost console by going to **Users** → **Authentication Settings** → **Client URL**.
|
||||
|
||||
Here is an example of how to redirect to another host or path:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
provider: '<provider>'
|
||||
options: {
|
||||
redirectTo: "<host>/<slug>" // Example: "https://example.com/dashboard"
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
## Provider OAuth scopes
|
||||
|
||||
Scopes are a mechanism in OAuth to allow or limit an application's access to a user's account.
|
||||
|
||||
By default, Nhost sets the scope to get the name, email, and avatar URL for each user. Editing scope is not currently supported.
|
||||
|
||||
## Provider OAuth Tokens
|
||||
|
||||
Nhost saves both access and refresh tokens for each user and provider in the `auth.user_providers` table. These tokens can be used to interact with the provider if needed.
|
||||
- [Twitch](/platform/authentication/sign-in-with-twitch)
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: Social Providers Configuration
|
||||
sidebar_label: Social Providers Configuration
|
||||
sidebar_position: 10
|
||||
---
|
||||
|
||||
## Enabling Social Sign-In Provider
|
||||
|
||||
To start with social sign-in, select your project in Nhost Dashboard and go to **Users** → **Authentication Settings**.
|
||||
|
||||
You need to set the Client ID and Client Secret for each provider that you want to enable.
|
||||
|
||||
## Implementing sign-in experience
|
||||
|
||||
Use the [Nhost JavaScript SDK](/reference/javascript) and the `signIn()` method to implement social sign-in for your project.
|
||||
|
||||
Here's an example of how to implement sign-in with GitHub:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
provider: 'github'
|
||||
})
|
||||
```
|
||||
|
||||
Users are redirected to your Nhost project's **client URL** by default. By default, your Nhost project's client URL is set to `http://localhost:3000`. You can change the value of your client URL in the Nhost console by going to **Users** → **Authentication Settings** → **Client URL**.
|
||||
|
||||
Here is an example of how to redirect to another host or path:
|
||||
|
||||
```js
|
||||
nhost.auth.signIn({
|
||||
provider: '<provider>'
|
||||
options: {
|
||||
redirectTo: "<host>/<slug>" // Example: "https://example.com/dashboard"
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
## Provider OAuth scopes
|
||||
|
||||
Scopes are a mechanism in OAuth to allow or limit an application's access to a user's account.
|
||||
|
||||
By default, Nhost sets the scope to get the name, email, and avatar URL for each user. Editing scope is not currently supported.
|
||||
|
||||
## Provider OAuth Tokens
|
||||
|
||||
Nhost saves both access and refresh tokens for each user and provider in the `auth.user_providers` table. These tokens can be used to interact with the provider if needed.
|
||||
@@ -6,13 +6,17 @@ image: /img/og/platform/event-triggers.png
|
||||
|
||||
Event Triggers enable you to invoke webhooks when a database event happens. Event Triggers are typically used to do post-processing tasks, using custom backend code, based on database events.
|
||||
|
||||
Event Triggers are associated with a specific table in the database the following event types are available:
|
||||
Event Triggers are associated with a specific table in the database and the following event types are available:
|
||||
|
||||
- **INSERT** - A row is inserted into a table
|
||||
- **UPDATE** - A row is updated in a table
|
||||
- **DELETE** - A row is deleted from a table
|
||||
- **INSERT** - A row is inserted into a table.
|
||||
- **UPDATE** - A row is updated in a table.
|
||||
- **DELETE** - A row is deleted from a table.
|
||||
|
||||
Event Triggers can also be triggered manually in the Hasura Console.
|
||||
:::info
|
||||
|
||||
It's currently only possible to create Event Triggers in the Hasura Console. We're working on adding support for creating Event Triggers in the Nhost Dashboard.
|
||||
|
||||
:::
|
||||
|
||||
### Example Use Case
|
||||
|
||||
@@ -30,7 +34,7 @@ Event Triggers are managed in the Hasura Console. Select **Events** in the main
|
||||
|
||||
## Event Triggers and Serverless Functions
|
||||
|
||||
Event Triggers and [Serverless Functions](/platform/serverless-functions) is a perfect combination to build powerful database-backend logic. Every Serverless Function is exposed as an HTTP endpoint that can be used as a webhook for your Event Triggers.
|
||||
Event Triggers and [Serverless Functions](/platform/serverless-functions) is a perfect combination to build powerful database-backend logic. Every Serverless Function is exposed as an HTTP endpoint and can be used as a webhook for Event Triggers.
|
||||
|
||||
### Format
|
||||
|
||||
@@ -40,7 +44,7 @@ When using Serverless Functions as webhooks you should configure the webhook usi
|
||||
{{NHOST_BACKEND_URL}}/v1/functions/orders-insert-send-email
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
The `NHOST_BACKEND_URL` is a [system environment variable](/platform/environment-variables#system-environment-variables) and available in production and in development environments using the [CLI](/platform/cli).
|
||||
|
||||
@@ -54,7 +58,7 @@ To set this up is a two-step process:
|
||||
|
||||
- Step 1: Add the header `nhost-webhook-secret` with the value `NHOST_WEBHOOK_SECRET` (From env var) when creating the Event Trigger in the Hasura Console.
|
||||
|
||||

|
||||

|
||||
|
||||
- Step 2: Check the header `nhost-webhook-secret` for incoming requests and make sure the header is the same as the environment variable `NHOST_WEBHOOK_SECRET`.
|
||||
|
||||
|
||||
@@ -9,52 +9,40 @@ import TabItem from '@theme/TabItem'
|
||||
|
||||
Every Nhost project comes with its own [Postgres database](https://postgres.org/). Postgres is the world's most advanced open-source relational database and it's the most [popular SQL database for developers](https://insights.stackoverflow.com/survey/2021#section-most-loved-dreaded-and-wanted-databases).
|
||||
|
||||
:::info
|
||||
There are three ways of managing your database:
|
||||
|
||||
It's currently not possible to connect directly to the Postgres database via a connection string. We're working on making the database available soon. You can follow [this issue on GitHub](https://github.com/nhost/nhost/issues/113).
|
||||
|
||||
:::
|
||||
|
||||
The database is managed via the Hasura Console where you can manage the database via an intuitive UI. You can also use SQL to directly interact with the database via the Hasura Console.
|
||||
|
||||
## Hasura Console
|
||||
|
||||
Hasura Console is where you manage your database. This is where you create and manage tables, schemas, and data.
|
||||
|
||||
1. Open the Hasura Console by clicking on **GraphQL** in the top menu in the Nhost Dashboard.
|
||||
2. Click **Open Hasura Console** at the top right of the page.
|
||||
3. Copy the **admin secret**, and click **Open Hasura**.
|
||||
4. Use the **admin secret** to sign in.
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true">
|
||||
<source src="/videos/open-hasura-console.mp4" type="video/mp4" />
|
||||
</video>
|
||||
1. Nhost Database UI (recommended).
|
||||
2. Hasura Console.
|
||||
3. [Connect directly to the database.](#postgres-access)
|
||||
|
||||
## Schemas
|
||||
|
||||
The two schemas `auth` and `storage` are reserved for Nhost Auth and Nhost Storage to work. You're allowed to modify **permissions** and **add relationships**. However, never modify any tables or remove relationships that were added by Nhost inside the `auth` and `storage` schemas.
|
||||
Generally, you should use the `public` schema for your project. It's also ok to add custom schemas for more advanced usage.
|
||||
|
||||
Generally, you should use the `public` schema when creating and managing your tables for your project. It's also ok to add custom schemas for more advanced usage.
|
||||
The two schemas `auth` and `storage` are reserved for [Nhost Auth](/platform/authentication) and [Nhost Storage](/platform/storage). You're allowed to modify **permissions** and **add relationships**. However, never modify any tables or remove relationships that were added by Nhost inside the `auth` and `storage` schemas.
|
||||
|
||||
## Create Table
|
||||
## Manage Tables
|
||||
|
||||
1. In Hasura Console, go to the **Data** tab, select the **public** schema in the left menu and click **Create Table**.
|
||||
2. Enter a table name.
|
||||
3. Add table columns.
|
||||
4. Add a primary key (usually the ID column).
|
||||
5. (Optional) Add foreign keys.
|
||||
6. (Optional) Add unique keys.
|
||||
7. Click **Add Table**.
|
||||
### Create Table
|
||||
|
||||
When a table is created the table is instantly available through the [GraphQL API](/platform/graphql).
|
||||
1. Go to **Database** in the left menu.
|
||||
2. Click **New table**.
|
||||
3. Enter a **name** for the table.
|
||||
4. Add **columns**.
|
||||
5. Select a **Primary Key** (usually the `id` column).
|
||||
6. (Optional) Select an **Identity** column. Identity is for integer columns only and is usually selected for the `id` column so the `id` is automatically incremented (1,2,3...) on new rows.
|
||||
7. (Optional) Add **Foreign Keys**.
|
||||
8. Click **Create**.
|
||||
|
||||
When a table is created it is instantly available through the [GraphQL API](/platform/graphql).
|
||||
|
||||
Here's an example of how to create a `customers` table:
|
||||
|
||||
<Tabs groupId="hasura-console-vs-sql">
|
||||
<TabItem value="hasura-cosnole" label="Hasura Console" default>
|
||||
<Tabs groupId="nhost-vs-sql">
|
||||
<TabItem value="nhost" label="Nhost" default>
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true">
|
||||
<source src="/videos/hasura-create-table.mp4" type="video/mp4" />
|
||||
<source src="/videos/nhost-table-create.mp4" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
</TabItem>
|
||||
@@ -62,7 +50,7 @@ Here's an example of how to create a `customers` table:
|
||||
|
||||
```sql
|
||||
CREATE TABLE "public"."customers" (
|
||||
"id" serial NOT NULL PRIMARY KEY,
|
||||
"id" bigint PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||||
"name" text NOT NULL
|
||||
);
|
||||
```
|
||||
@@ -70,19 +58,20 @@ CREATE TABLE "public"."customers" (
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Modify Table
|
||||
### Edit Table
|
||||
|
||||
1. In Hasura Console, go to the **Data** tab and click on the table you want to edit in the left menu.
|
||||
2. Click **Modify**.
|
||||
3. Modify or add table columns.
|
||||
1. Go to the **Database** in the left menu
|
||||
2. Click on the **context menu** of the table you want to change and click **Edit table**.
|
||||
3. **Edit** (add, change, delete) the table's columns.
|
||||
4. Click **Save**.
|
||||
|
||||
Here's an example of how to modify a `customers` table by adding an `address` column:
|
||||
Here's an example of how to edit a `customers` table by adding an `address` column:
|
||||
|
||||
<Tabs groupId="hasura-console-vs-sql">
|
||||
<TabItem value="hasura-cosnole" label="Hasura Console" default>
|
||||
<Tabs groupId="nhost-vs-sql">
|
||||
<TabItem value="nhost" label="Nhost" default>
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true">
|
||||
<source src="/videos/hasura-modify-table.mp4" type="video/mp4" />
|
||||
<source src="/videos/nhost-table-edit.mp4" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
</TabItem>
|
||||
@@ -95,20 +84,19 @@ ALTER TABLE "public"."customers" ADD COLUMN "address" text;
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Delete Table
|
||||
### Delete Table
|
||||
|
||||
1. In Hasura Console, go to the **Data** tab and select the table you want to delete in the left menu.
|
||||
2. Click **Modify**.
|
||||
3. Scroll to the bottom of the page and click **Delete table** to open the confirmation dialog.
|
||||
4. Type the **name of the table** and click OK.
|
||||
1. Go to the **Database** in the left menu
|
||||
2. Click on the **context menu** of the table you want to delete and click **Delete table**.
|
||||
3. Click **Delete** to confirm deleting the table.
|
||||
|
||||
Here's an example of how to delete a `customers` table:
|
||||
**Example:** Delete a `customers` table:
|
||||
|
||||
<Tabs groupId="hasura-console-vs-sql">
|
||||
<TabItem value="hasura-cosnole" label="Hasura Console" default>
|
||||
<Tabs groupId="nhost-vs-sql">
|
||||
<TabItem value="nhost" label="Nhost" default>
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true">
|
||||
<source src="/videos/hasura-delete-table.mp4" type="video/mp4" />
|
||||
<source src="/videos/nhost-table-delete.mp4" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
</TabItem>
|
||||
@@ -121,6 +109,34 @@ DROP TABLE "public"."customers";
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Postgres Access
|
||||
|
||||
It's possible to access your Postgres database directly with your favorite Postgres client.
|
||||
|
||||
:::info
|
||||
|
||||
For projects older than September 2022, it's not possible to connect directly to the database via a connection string. We're working on a one-click fix that can be expected to be available in October 2022.
|
||||
|
||||
:::
|
||||
|
||||
Go to **Settings** in the left menu and click on **Database**. You'll find the connection string and credentials to connect to your database.
|
||||
|
||||

|
||||
|
||||
### Reset Postgres Password
|
||||
|
||||
It's possible to reset the database password that was provided when the project was created.
|
||||
|
||||
1. Go to the **Overview** page of your project.
|
||||
2. Click on **Project Settings**.
|
||||
3. Click on **Reset Database Password**.
|
||||
4. Either **copy** the newly automatically generated password, or **type** your own new database password.
|
||||
5. Click **Reset Database Password**.
|
||||
|
||||
<video width="99%" autoPlay muted loop controls="true">
|
||||
<source src="/videos/nhost-database-reset-password.mp4" type="video/mp4" />
|
||||
</video>
|
||||
|
||||
## Migrations
|
||||
|
||||
To track database changes, use the [Nhost CLI](/platform/cli) to develop locally and use our [GitHub integration](/platform/github-integration) to automatically deploy database migrations live.
|
||||
@@ -148,12 +164,14 @@ nhost/seeds/default/002-products.sql
|
||||
|
||||
## Backups
|
||||
|
||||
Databases on [Pro and Enterprise plans](https://nhost.io/pricing) are backed up automatically.
|
||||
Databases on the [Pro and Enterprise plans](https://nhost.io/pricing) are automatically backed up daily.
|
||||
|
||||
## Best Practices
|
||||
|
||||
- Use lower-case names for tables. E.g. `customers` instead of `Customers`.
|
||||
- Use plural names for tables. E.g. `customers` instead of `customer`.
|
||||
- use underscore (`_`) instead of camelCase for table names. E.g. `customer_invoices` instead of `customerInvoices`.
|
||||
- use underscore (`_`) instead of camelCase for column names. E.g. `first_name` instead of `firstName`.
|
||||
|
||||
## Next Steps
|
||||
|
||||
|
||||
BIN
docs/static/img/database/connection-info.png
vendored
Normal file
BIN
docs/static/img/database/connection-info.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 231 KiB |
BIN
docs/static/videos/enable-security-keys-sign-in.mp4
vendored
Normal file
BIN
docs/static/videos/enable-security-keys-sign-in.mp4
vendored
Normal file
Binary file not shown.
BIN
docs/static/videos/hasura-create-table.mp4
vendored
BIN
docs/static/videos/hasura-create-table.mp4
vendored
Binary file not shown.
BIN
docs/static/videos/hasura-delete-table.mp4
vendored
BIN
docs/static/videos/hasura-delete-table.mp4
vendored
Binary file not shown.
BIN
docs/static/videos/hasura-modify-table.mp4
vendored
BIN
docs/static/videos/hasura-modify-table.mp4
vendored
Binary file not shown.
BIN
docs/static/videos/nhost-database-reset-password.mp4
vendored
Normal file
BIN
docs/static/videos/nhost-database-reset-password.mp4
vendored
Normal file
Binary file not shown.
BIN
docs/static/videos/nhost-table-create.mp4
vendored
Normal file
BIN
docs/static/videos/nhost-table-create.mp4
vendored
Normal file
Binary file not shown.
BIN
docs/static/videos/nhost-table-delete.mp4
vendored
Normal file
BIN
docs/static/videos/nhost-table-delete.mp4
vendored
Normal file
Binary file not shown.
BIN
docs/static/videos/nhost-table-edit.mp4
vendored
Normal file
BIN
docs/static/videos/nhost-table-edit.mp4
vendored
Normal file
Binary file not shown.
@@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
hasura_graphql_enable_remote_schema_permissions: false
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.13.0
|
||||
image: nhost/hasura-auth:0.13.2
|
||||
storage:
|
||||
image: nhost/hasura-storage:0.2.4
|
||||
auth:
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
hasura_graphql_enable_remote_schema_permissions: false
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.13.0
|
||||
image: nhost/hasura-auth:0.13.2
|
||||
storage:
|
||||
image: nhost/hasura-storage:0.2.4
|
||||
auth:
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
hasura_graphql_enable_remote_schema_permissions: false
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.13.0
|
||||
image: nhost/hasura-auth:0.13.2
|
||||
storage:
|
||||
image: nhost/hasura-storage:0.2.4
|
||||
auth:
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
hasura_graphql_enable_remote_schema_permissions: false
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.13.0
|
||||
image: nhost/hasura-auth:0.13.2
|
||||
storage:
|
||||
image: nhost/hasura-storage:0.2.4
|
||||
auth:
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
hasura_graphql_enable_remote_schema_permissions: false
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.13.0
|
||||
image: nhost/hasura-auth:0.13.2
|
||||
storage:
|
||||
image: nhost/hasura-storage:0.2.4
|
||||
auth:
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
hasura_graphql_enable_remote_schema_permissions: false
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.13.0
|
||||
image: nhost/hasura-auth:0.13.2
|
||||
storage:
|
||||
image: nhost/hasura-storage:0.2.4
|
||||
auth:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
import { Button, Modal, TextInput } from '@mantine/core'
|
||||
import { Button, Divider, Modal, TextInput } from '@mantine/core'
|
||||
import { showNotification } from '@mantine/notifications'
|
||||
import { useSignInEmailPassword } from '@nhost/react'
|
||||
|
||||
@@ -78,7 +78,6 @@ export const EmailPassword: React.FC = () => {
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
placeholder="Email Address"
|
||||
size="lg"
|
||||
autoFocus
|
||||
style={{ marginBottom: '0.5em' }}
|
||||
/>
|
||||
@@ -87,7 +86,6 @@ export const EmailPassword: React.FC = () => {
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
placeholder="Password"
|
||||
type="password"
|
||||
size="lg"
|
||||
style={{ marginBottom: '0.5em' }}
|
||||
/>
|
||||
<Button fullWidth onClick={signIn}>
|
||||
@@ -96,6 +94,10 @@ export const EmailPassword: React.FC = () => {
|
||||
<AuthLink link="/sign-in/forgot-password" variant="white">
|
||||
Forgot password?
|
||||
</AuthLink>
|
||||
<Divider />
|
||||
<AuthLink link="/sign-in" variant="white">
|
||||
← Other Sign-in Options
|
||||
</AuthLink>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ export const EmailPasswordless: React.FC = () => {
|
||||
<>
|
||||
<PasswordlessForm />
|
||||
<Divider />
|
||||
<AuthLink link="/sign-up" variant="white">
|
||||
← Other Login Options
|
||||
<AuthLink link="/sign-in" variant="white">
|
||||
← Other Sign-in Options
|
||||
</AuthLink>
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { FormEvent, useState } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
import { Button, Modal, SimpleGrid, TextInput } from '@mantine/core'
|
||||
import { Button, Divider, Modal, SimpleGrid, TextInput } from '@mantine/core'
|
||||
import { showNotification } from '@mantine/notifications'
|
||||
import { useSignInEmailSecurityKey } from '@nhost/react'
|
||||
|
||||
import AuthLink from '../components/AuthLink'
|
||||
|
||||
export const SecurityKeySignIn: React.FC = () => {
|
||||
const { signInEmailSecurityKey } = useSignInEmailSecurityKey()
|
||||
const [email, setEmail] = useState('')
|
||||
@@ -56,6 +58,10 @@ export const SecurityKeySignIn: React.FC = () => {
|
||||
Sign in with a security key
|
||||
</Button>
|
||||
</form>
|
||||
<Divider />
|
||||
<AuthLink link="/sign-in" variant="white">
|
||||
← Other Sign-in Options
|
||||
</AuthLink>
|
||||
</SimpleGrid>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ export const EmailPassword: React.FC = () => {
|
||||
</SimpleGrid>
|
||||
<Divider />
|
||||
<AuthLink link="/sign-up" variant="white">
|
||||
← Other Registration Options
|
||||
← Other Sign-up Options
|
||||
</AuthLink>
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@ export const EmailPasswordless: React.FC = () => {
|
||||
<EmailPasswordlessForm />
|
||||
<Divider />
|
||||
<AuthLink link="/sign-up" variant="white">
|
||||
← Other Registration Options
|
||||
← Other Sign-up Options
|
||||
</AuthLink>
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { FormEvent, useState } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
import { Button, Modal, SimpleGrid, TextInput } from '@mantine/core'
|
||||
import { Button, Divider, Modal, SimpleGrid, TextInput } from '@mantine/core'
|
||||
import { showNotification } from '@mantine/notifications'
|
||||
import { useSignUpEmailSecurityKeyEmail } from '@nhost/react'
|
||||
|
||||
import AuthLink from '../components/AuthLink'
|
||||
|
||||
export const SecurityKeySignUp: React.FC = () => {
|
||||
const { signUpEmailSecurityKey } = useSignUpEmailSecurityKeyEmail()
|
||||
const [email, setEmail] = useState('')
|
||||
@@ -56,6 +58,10 @@ export const SecurityKeySignUp: React.FC = () => {
|
||||
Sign up with a security key
|
||||
</Button>
|
||||
</form>
|
||||
<Divider />
|
||||
<AuthLink link="/sign-up" variant="white">
|
||||
← Other Sign-up Options
|
||||
</AuthLink>
|
||||
</SimpleGrid>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
hasura_graphql_enable_remote_schema_permissions: false
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.13.0
|
||||
image: nhost/hasura-auth:0.13.2
|
||||
storage:
|
||||
image: nhost/hasura-storage:0.2.4
|
||||
auth:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Docker image versions used in the cloud
|
||||
hasura: v2.10.1
|
||||
auth: 0.13.0
|
||||
auth: 0.13.2
|
||||
storage: 0.2.4
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
hasura_graphql_enable_remote_schema_permissions: false
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.13.0
|
||||
image: nhost/hasura-auth:0.13.2
|
||||
storage:
|
||||
image: nhost/hasura-storage:0.2.4
|
||||
auth:
|
||||
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
hasura_graphql_enable_remote_schema_permissions: false
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.13.0
|
||||
image: nhost/hasura-auth:0.13.2
|
||||
storage:
|
||||
image: nhost/hasura-storage:0.2.4
|
||||
auth:
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @nhost/nextjs
|
||||
|
||||
## 1.7.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 1e31a956: read nextjs context cookies in `createServerSideClient`
|
||||
- 8eafa198: Fix `createServerSideClient`
|
||||
|
||||
The refresh token was not fetched from the cookie when using `createServerSideClient` since [this PR](https://github.com/nhost/nhost/pull/823).
|
||||
It is now fixed.
|
||||
|
||||
## 1.7.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nextjs",
|
||||
"version": "1.7.6",
|
||||
"version": "1.7.7",
|
||||
"description": "Nhost NextJS library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -31,7 +31,9 @@ export const createServerSideClient = async (
|
||||
const urlKey = key === NHOST_REFRESH_TOKEN_KEY ? 'refreshToken' : key
|
||||
const urlValue = context.query[urlKey]
|
||||
const cookieValue = Cookies.get(key) ?? null
|
||||
return typeof urlValue === 'string' ? urlValue : cookieValue
|
||||
const nextCtxValue = context.req.cookies[key]
|
||||
|
||||
return typeof urlValue === 'string' ? urlValue : cookieValue ?? nextCtxValue
|
||||
},
|
||||
setItem: (key, value) => {
|
||||
// TODO: Set expires based on the actual refresh token expire time
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
{
|
||||
"extends": "../../config/react-library.tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"paths": {}
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
@@ -5,7 +5,7 @@ services:
|
||||
environment:
|
||||
hasura_graphql_enable_remote_schema_permissions: false
|
||||
auth:
|
||||
image: nhost/hasura-auth:0.13.0
|
||||
image: nhost/hasura-auth:0.13.2
|
||||
storage:
|
||||
image: nhost/hasura-storage:0.2.4
|
||||
auth:
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/stripe-graphql-js
|
||||
|
||||
## 0.0.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c922de7b: feat/added async support for isAllowed prop for createStripeGraphQLServer
|
||||
|
||||
## 0.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<h2 align="center">Stripe GraphQL API</h2>
|
||||
|
||||
<p align="center">
|
||||
<img alt="npm" src="https://img.shields.io/npm/v/@nhost/stripe-graphql">
|
||||
<img alt="npm" src="https://img.shields.io/npm/dm/@nhost/stripe-graphql">
|
||||
<img alt="npm" src="https://img.shields.io/npm/v/@nhost/stripe-graphql-js">
|
||||
<img alt="npm" src="https://img.shields.io/npm/dm/@nhost/stripe-graphql-js">
|
||||
<a href="LICENSE">
|
||||
<img src="https://img.shields.io/badge/license-MIT-yellow.svg" alt="license: MIT" />
|
||||
</a>
|
||||
@@ -14,7 +14,7 @@ This package creates a Stripe GraphQL API.
|
||||
```graphql
|
||||
query {
|
||||
stripe {
|
||||
customer(id: "cus_MVBRpmnBis9v5x") {
|
||||
customer(id: "cus_xxx" {
|
||||
id
|
||||
name
|
||||
invoices {
|
||||
@@ -79,6 +79,24 @@ export default server
|
||||
|
||||
> You can run the Stripe GraphQL API in any JS environment because it's built using [GraphQL Yoga](https://github.com/dotansimha/graphql-yoga).
|
||||
|
||||
### Stripe Secret Key
|
||||
|
||||
Add `STRIPE_SECRET_KEY` as an environment variable. If you're using Nhost, add `STRIPE_SECRET_KEY` to `.env.development` like this:
|
||||
|
||||
```
|
||||
STRIPE_SECRET_KEY=sk_test_xxx
|
||||
```
|
||||
|
||||
Learn more about [Stripe API keys](https://stripe.com/docs/keys#obtain-api-keys).
|
||||
|
||||
### Start Nhost
|
||||
|
||||
```
|
||||
nhost up
|
||||
```
|
||||
|
||||
Learn more about the [Nhost CLI](https://docs.nhost.io/platform/cli).
|
||||
|
||||
### Test
|
||||
|
||||
Test the Stripe GraphQL API in the browser:
|
||||
@@ -92,7 +110,7 @@ Add the Stripe GraphQL API as a Remote Schema in Hasura.
|
||||
**URL**
|
||||
|
||||
```
|
||||
{{NHOST_BACKEND_URL}}/v1/functions/graphql/stripe`
|
||||
{{NHOST_BACKEND_URL}}/v1/functions/graphql/stripe
|
||||
```
|
||||
|
||||
**Headers**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/stripe-graphql-js",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.4",
|
||||
"description": "Stripe GraphQL API",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -17,7 +17,7 @@ builder.objectType('Stripe', {
|
||||
resolve: async (_parent, { id }, context) => {
|
||||
const { isAllowed } = context
|
||||
|
||||
if (!isAllowed(id, context)) {
|
||||
if (!await isAllowed(id, context)) {
|
||||
throw new GraphQLYogaError('Not allowed')
|
||||
}
|
||||
|
||||
@@ -64,7 +64,12 @@ builder.objectType('Stripe', {
|
||||
starting_after: startingAfter || undefined
|
||||
})
|
||||
|
||||
const customerData = customers.data.filter((customer) => isAllowed(customer.id, context))
|
||||
const customerData: Stripe.Customer[] = []
|
||||
for (const customer of customers.data) {
|
||||
if (await isAllowed(customer.id, context)) {
|
||||
customerData.push(customer)
|
||||
}
|
||||
}
|
||||
|
||||
customers.data = customerData
|
||||
|
||||
@@ -95,7 +100,7 @@ builder.objectType('StripeMutations', {
|
||||
resolve: async (_, { customer, configuration, locale, returnUrl }, context) => {
|
||||
const { isAllowed } = context
|
||||
|
||||
if (!isAllowed(customer, context)) {
|
||||
if (!await isAllowed(customer, context)) {
|
||||
throw new GraphQLYogaError('Not allowed')
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import type Stripe from 'stripe'
|
||||
import type { CORSOptions, YogaInitialContext } from '@graphql-yoga/node'
|
||||
|
||||
export type StripeGraphQLContext = {
|
||||
isAllowed: (stripeCustomerId: string, context: Context) => boolean
|
||||
isAllowed: (stripeCustomerId: string, context: Context) => boolean | Promise<boolean>
|
||||
userClaims?: UserHasuraClaims
|
||||
isAdmin: boolean
|
||||
}
|
||||
@@ -12,7 +12,7 @@ export type Context = YogaInitialContext & StripeGraphQLContext
|
||||
|
||||
export type CreateServerProps = {
|
||||
cors?: CORSOptions
|
||||
isAllowed?: (stripeCustomerId: string, context: Context) => boolean
|
||||
isAllowed?: (stripeCustomerId: string, context: Context) => boolean | Promise<boolean>
|
||||
graphiql?: boolean
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user