Compare commits
65 Commits
@nhost/nex
...
@nhost/nex
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
620566fa4d | ||
|
|
4ce8b88d27 | ||
|
|
28d25e46de | ||
|
|
12bc30daa3 | ||
|
|
7b5f00d10e | ||
|
|
58e1485c13 | ||
|
|
a64f1c4396 | ||
|
|
32edfb4a9f | ||
|
|
848db9b672 | ||
|
|
3766921bcc | ||
|
|
5546052b2c | ||
|
|
c569b56d3d | ||
|
|
52ffa84adb | ||
|
|
b5ae438a8e | ||
|
|
fae05f7af2 | ||
|
|
380d7fc8ce | ||
|
|
94132bbc7f | ||
|
|
d87a9d7c79 | ||
|
|
be7756d4a2 | ||
|
|
ca5e335bff | ||
|
|
b9ed794f2b | ||
|
|
042dc7d27c | ||
|
|
db2df3d5b2 | ||
|
|
0b1cb628f2 | ||
|
|
912d95d153 | ||
|
|
76059f4738 | ||
|
|
011572f3ef | ||
|
|
b727b354dd | ||
|
|
a0682ed22e | ||
|
|
4d16306e56 | ||
|
|
b7861bbd36 | ||
|
|
e279805896 | ||
|
|
e3ebd9cb1b | ||
|
|
5bb928da2c | ||
|
|
ab06e96eac | ||
|
|
6e2aabbda0 | ||
|
|
e4ce235f38 | ||
|
|
e783b7478b | ||
|
|
06d2d2b0c7 | ||
|
|
656379e78b | ||
|
|
4156a9a61e | ||
|
|
0b72829274 | ||
|
|
6b0baab151 | ||
|
|
93f9d2d01d | ||
|
|
3fb3d4c282 | ||
|
|
ccba0b5015 | ||
|
|
62e331500d | ||
|
|
4104ddbcb6 | ||
|
|
43fc040a29 | ||
|
|
e472b2cb19 | ||
|
|
6570a940ee | ||
|
|
d3e97c87d6 | ||
|
|
36508c7930 | ||
|
|
709d364749 | ||
|
|
73eb2db159 | ||
|
|
86eb8903dc | ||
|
|
d665473074 | ||
|
|
58534c24f0 | ||
|
|
90a1c3b9e1 | ||
|
|
bdfa2b3053 | ||
|
|
2c5b31f27a | ||
|
|
d75fd747e0 | ||
|
|
a71b3aff59 | ||
|
|
13935ebdc4 | ||
|
|
f6093a619f |
42
README.md
42
README.md
@@ -20,7 +20,7 @@
|
||||
<hr />
|
||||
</div>
|
||||
|
||||
**Nhost is a open-source GraphQL backend,** built with the following things in mind:
|
||||
**Nhost is an open-source GraphQL backend,** built with the following things in mind:
|
||||
|
||||
- Open-Source
|
||||
- Developer Productivity
|
||||
@@ -213,6 +213,13 @@ Here are some ways of contributing to making Nhost better:
|
||||
</a>
|
||||
</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>
|
||||
<td align="center">
|
||||
<a href="https://github.com/jerryjappinen">
|
||||
<img src="https://avatars.githubusercontent.com/u/1101002?v=4" width="100;" alt="jerryjappinen"/>
|
||||
@@ -227,6 +234,13 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Mustafa Hanif</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/timpratim">
|
||||
<img src="https://avatars.githubusercontent.com/u/32492961?v=4" width="100;" alt="timpratim"/>
|
||||
<br />
|
||||
<sub><b>Pratim</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/Savinvadim1312">
|
||||
<img src="https://avatars.githubusercontent.com/u/16936043?v=4" width="100;" alt="Savinvadim1312"/>
|
||||
@@ -240,7 +254,8 @@ Here are some ways of contributing to making Nhost better:
|
||||
<br />
|
||||
<sub><b>Amir Ahmic</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
</td></tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://github.com/akd-io">
|
||||
<img src="https://avatars.githubusercontent.com/u/30059155?v=4" width="100;" alt="akd-io"/>
|
||||
@@ -254,8 +269,7 @@ Here are some ways of contributing to making Nhost better:
|
||||
<br />
|
||||
<sub><b>Colin Broderick</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/dohomi">
|
||||
<img src="https://avatars.githubusercontent.com/u/489221?v=4" width="100;" alt="dohomi"/>
|
||||
@@ -263,6 +277,13 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Dominic Garms</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/GavanWilhite">
|
||||
<img src="https://avatars.githubusercontent.com/u/2085119?v=4" width="100;" alt="GavanWilhite"/>
|
||||
<br />
|
||||
<sub><b>Gavan Wilhite</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/alveshelio">
|
||||
<img src="https://avatars.githubusercontent.com/u/8176422?v=4" width="100;" alt="alveshelio"/>
|
||||
@@ -276,7 +297,8 @@ 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/ghoshnirmalya">
|
||||
<img src="https://avatars.githubusercontent.com/u/6391763?v=4" width="100;" alt="ghoshnirmalya"/>
|
||||
@@ -284,21 +306,13 @@ Here are some ways of contributing to making Nhost better:
|
||||
<sub><b>Nirmalya Ghosh</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/timpratim">
|
||||
<img src="https://avatars.githubusercontent.com/u/32492961?v=4" width="100;" alt="timpratim"/>
|
||||
<br />
|
||||
<sub><b>Pratim</b></sub>
|
||||
</a>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/quentin-decre">
|
||||
<img src="https://avatars.githubusercontent.com/u/1137511?v=4" width="100;" alt="quentin-decre"/>
|
||||
<br />
|
||||
<sub><b>Quentin Decré</b></sub>
|
||||
</a>
|
||||
</td></tr>
|
||||
<tr>
|
||||
</td>
|
||||
<td align="center">
|
||||
<a href="https://github.com/komninoschat">
|
||||
<img src="https://avatars.githubusercontent.com/u/29049104?v=4" width="100;" alt="komninoschat"/>
|
||||
|
||||
@@ -24,7 +24,7 @@ $ pnpm build
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
||||
|
||||
### Serve
|
||||
### Serve
|
||||
|
||||
```bash
|
||||
$ pnpm serve
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
title: 'Metadata and Serverless Functions'
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
In the previous section, we only created a new table; `customers`. Using the CLI you can also do changes to other parts of your backend.
|
||||
|
||||
There are three things the CLI and the GitHub integration track and applies to production:
|
||||
@@ -73,20 +76,25 @@ Serverless functions are placed in the `functions/` folder of your repository. E
|
||||
|
||||
Before we create our serverless function we'll install `express`, which is a requirement for serverless functions to work.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="npm" label="npm" default>
|
||||
|
||||
```bash
|
||||
npm install express
|
||||
# or with yarn
|
||||
yarn add express
|
||||
npm install -d @types/node @types/express
|
||||
```
|
||||
|
||||
We'll use TypeScript so we'll install two type definitions too:
|
||||
</TabItem>
|
||||
<TabItem value="yarn" label="Yarn">
|
||||
|
||||
```bash
|
||||
npm install -d @types/node @types/express
|
||||
# or with yarn
|
||||
yarn add express
|
||||
yarn add -D @types/node @types/express
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
Then we'll create a file `functions/time.ts`
|
||||
|
||||
In the file `time.ts` we'll add the following code to create our serverless function:
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
title: 'Create your app'
|
||||
slug: /get-started/quick-start
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
title: 'JavaScript client'
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
In the previous section, you used the Hasura Console to fetch a list of todos. Now, you will write a small JavaScript client to interact and retrieve todos from your Nhost app.
|
||||
|
||||
### Frontend frameworks
|
||||
@@ -14,40 +17,36 @@ In this guide, we'll keep the example simple. We're not using a frontend framewo
|
||||
|
||||
## Setup
|
||||
|
||||
> Make sure you have [Node.js](https://nodejs.org) and [npm](https://docs.npmjs.com/getting-started) installed.
|
||||
:::info
|
||||
|
||||
Create a new folder called `nhost-todos`, and initialize a new JavaScript app there:
|
||||
Make sure you have [Node.js](https://nodejs.org) and [npm](https://docs.npmjs.com/getting-started) or [Yarn](https://classic.yarnpkg.com/lang/en/docs/install) installed.
|
||||
|
||||
Using npm package manager
|
||||
:::
|
||||
|
||||
Create a new folder called `nhost-todos`, initialize a new JavaScript app there, and install the Nhost JavaScript SDK:
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="npm" label="npm" default>
|
||||
|
||||
```bash
|
||||
npm init -y
|
||||
yarn add @nhost/nhost-js graphql
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
Using Yarn package manager
|
||||
</TabItem>
|
||||
<TabItem value="yarn" label="Yarn">
|
||||
|
||||
```bash
|
||||
yarn init -y
|
||||
npm install @nhost/nhost-js graphql
|
||||
```
|
||||
|
||||
> You might have to edit the `package.json` file and add/change the `type` object to `module` (`"type": "module"`).
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
Install Nhost JavaScript SDK:
|
||||
|
||||
Using npm package manager
|
||||
|
||||
```bash
|
||||
npm install @nhost/nhost-js
|
||||
```
|
||||
|
||||
or
|
||||
Using Yarn package manager
|
||||
|
||||
```bash
|
||||
yarn add @nhost/nhost-js
|
||||
```
|
||||
:::caution attention
|
||||
You might have to edit the `package.json` file and add/change the `type` object to `module` (`"type": "module"`).
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title: 'Set permissions'
|
||||
---
|
||||
|
||||
In the previous section, you could fetch the todos because the **admin** role is enabled by default when using Hasura Console. When building your applications, you want to define permissions using **roles** that your users can assume when making requests.
|
||||
While using the Hasura Console, you could fetch the todos because the **admin** role is enabled by default but when building your applications with a client, you want to define permissions using **roles** that your users can assume when making requests.
|
||||
|
||||
Hasura supports role-based access control. You create rules for each role, table, and operation (select, insert, update and delete) that can check dynamic session variables, like user ID.
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ cd my-nhost-v2-app
|
||||
|
||||
### Update config
|
||||
|
||||
Update `config: 3` to `config: 2` in `nhost/config.yaml`. This will update Hasura's configuration version, and we need to downgrade the version when we export migrations and metadata.
|
||||
Update `version: 3` to `version: 2` in `nhost/config.yaml`. This will update Hasura's configuration version, and we need to downgrade the version when we export migrations and metadata.
|
||||
|
||||
### Export current migrations and metadata from Nhost v1
|
||||
|
||||
@@ -88,15 +88,17 @@ Update `config: 2` to `config: 3` in `nhost/config.yaml`.
|
||||
|
||||
### Pull migrations and metadata from our local instance
|
||||
|
||||
:::tip
|
||||
You can not use port `1337` in these requests. You have to use the specific port Huasra uses. Go to the Hasura Console under API and look what port Hasura is using under GraphQL Endpoint.
|
||||
:::
|
||||
In the `nhost/` folder, run the following command:
|
||||
|
||||
```bash
|
||||
hasura migrate create init --from-server --endpoint=http://localhost:[hasura-port] --admin-secret=nhost-admin-secret
|
||||
hasura metadata export --from-server --endpoint=http://localhost:[hasura-port] --admin-secret=nhost-admin-secret
|
||||
hasura metadata export --endpoint=http://localhost:[hasura-port] --admin-secret=nhost-admin-secret
|
||||
```
|
||||
|
||||
:::warning
|
||||
You cannot use port `1337` in the commands above. You have to use the specific port Hasura uses. Go to the Hasura Console under API and look for the port Hasura is using under GraphQL Endpoint.
|
||||
:::
|
||||
|
||||
### Done
|
||||
|
||||
You now have a Nhost v2 project locally with correct migrations and metadata. Happy hacking!
|
||||
|
||||
5
docs/docs/platform/_category_.json
Normal file
5
docs/docs/platform/_category_.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"label": "The Nhost Platform",
|
||||
"position": 1,
|
||||
"link": { "type": "generated-index", "slug": "/platform" }
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"label": "Authentication",
|
||||
"position": 3,
|
||||
"position": 4,
|
||||
"link": { "id": "platform/authentication/index", "type": "doc" }
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ await nhost.auth.signIn({
|
||||
|
||||
A user can be created anonymously. This is useful for offering a limited version of your application to your users without having them sign in first.
|
||||
|
||||
An anonymous user gets a user ID with the `anonymous` role. This role can be used to [set permissions in Hasura](/platform/database/permissions).
|
||||
An anonymous user gets a user ID with the `anonymous` role. This role can be used to [set permissions in Hasura](/platform/graphql/permissions).
|
||||
|
||||
### Deanonymize users
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{
|
||||
"label": "Database",
|
||||
"position": 2,
|
||||
"collapsed": false,
|
||||
"link": { "type": "generated-index", "slug": "/platform/database" }
|
||||
"position": 2
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'Schema'
|
||||
title: 'Database'
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
4
docs/docs/platform/graphql/_category_.json
Normal file
4
docs/docs/platform/graphql/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "GraphQL",
|
||||
"position": 3
|
||||
}
|
||||
@@ -1,31 +1,49 @@
|
||||
---
|
||||
title: 'GraphQL'
|
||||
sidebar_position: 3
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
GraphQL is a query language for APIs. It provides a complete and understandable description of the data in your API.
|
||||
Every Nhost app has its own autogenerated GraphQL API. The GraphQL API is based on the tables and columns in the [Postgres database](/platform/database) and is instantly available. It's [Hasura GraphQL engine](https://github.com/hasura/graphql-engine) that powers the GraphQL API.
|
||||
|
||||
Every Nhost app comes with a GraphQL API, and you can connect to this API with any GraphQL client you like. Most often you'd use the client included in [Nhost SDK](/reference/sdk/graphql).
|
||||
The GraphQL API is available at: `https://[subdomain].nhost.run/v1/graphql`.
|
||||
|
||||
## What is GraphQL
|
||||
|
||||
GraphQL is a query language for APIs that prioritize developer experience. The GraphQL API can be used to both fetch (query) and modify (mutation) data. GraphQL is especially powerful for frontend developers who wants to build products fast.
|
||||
|
||||
### GraphQL clients for JavaScript
|
||||
|
||||
To interact with the GraphQL API it's recommended to use a GraphQL client:
|
||||
|
||||
- [Apollo Client](https://www.apollographql.com/docs/react/)
|
||||
- [URQL](https://formidable.com/open-source/urql/)
|
||||
- [React Query](https://react-query.tanstack.com/graphql)
|
||||
- [SWR](https://swr.vercel.app/docs/data-fetching#graphql)
|
||||
|
||||
It's also possible to use the built-in [GraphQL client](/reference/sdk/graphql) in the Nhost JavaScript client.
|
||||
|
||||
---
|
||||
|
||||
## GraphQL queries
|
||||
## GraphQL Query
|
||||
|
||||
You can read your app's data with a GraphQL query.
|
||||
A GraphQL query is used to fetch data from the database.
|
||||
|
||||
Here is a GraphQL query that selects title, body, and done for every row in your todos table.
|
||||
Here is a GraphQL query that selects `title`, `body`, and `isCompleted` for every row in a `todos` table.
|
||||
|
||||
**Example:**
|
||||
|
||||
```graphql
|
||||
query GetTodos {
|
||||
todos {
|
||||
title
|
||||
body
|
||||
done
|
||||
isCompleted
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Response:
|
||||
**Response:**
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -33,7 +51,7 @@ Response:
|
||||
"todos": [
|
||||
{
|
||||
"title": "Delete Firebase account",
|
||||
"body": "Migrate to nhost.io",
|
||||
"body": "Migrate to Nhost",
|
||||
"isCompleted": true
|
||||
}
|
||||
]
|
||||
@@ -43,7 +61,7 @@ Response:
|
||||
|
||||
#### Filtering and sorting
|
||||
|
||||
More complex queries utilize filters, limits, sorting and aggregation.
|
||||
GraphQL queries More complex queries utilize filters, limits, sorting and aggregation.
|
||||
|
||||
This GraphQL query selects all items in the todo table that aren't done, with the total number of comments and the last five comments:
|
||||
|
||||
@@ -98,6 +116,12 @@ Response:
|
||||
}
|
||||
```
|
||||
|
||||
:::tip
|
||||
Check out Hasura's documentation for full documentation for GraphQL queries.
|
||||
|
||||
[Hasura GraphQL queries](https://hasura.io/docs/latest/graphql/core/databases/postgres/queries/index/)
|
||||
:::
|
||||
|
||||
---
|
||||
|
||||
## GraphQL mutations
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 'Permissions'
|
||||
sidebar_position: 2
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
The GraphQL API is protected by a role-based permission system based on access tokens. Permissions are handled on a per-table basis in Hasura Console.
|
||||
@@ -1,35 +1,11 @@
|
||||
---
|
||||
title: 'The Nhost platform'
|
||||
title: 'The Nhost Platform'
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
This section:
|
||||
|
||||
### Database
|
||||
|
||||
- [Schema](/platform/database)
|
||||
- [Permissions](/platform/database/permissions)
|
||||
- [GraphQL](/platform/database/graphql)
|
||||
|
||||
### Authentication
|
||||
|
||||
- [Authentication overview](/platform/authentication)
|
||||
- [User management](/platform/authentication/user-management)
|
||||
- [Sign-in methods](/platform/authentication/sign-in-methods)
|
||||
- [OAuth providers](/platform/authentication/social-sign-in)
|
||||
- [Email templates](/platform/authentication/email-templates)
|
||||
|
||||
### Storage
|
||||
|
||||
- [File storage](/platform/storage)
|
||||
|
||||
### Serverless functions
|
||||
|
||||
- [Creating functions](/platform/serverless-functions)
|
||||
- [Event triggers](/platform/serverless-functions/event-triggers)
|
||||
|
||||
### Nhost
|
||||
|
||||
- [Environment variables](/platform/nhost/environment-variables)
|
||||
- [GitHub integration](/platform/nhost/github-integration)
|
||||
- [Local development](/platform/nhost/local-development)
|
||||
- [Database](/platform/database)
|
||||
- [GraphQL](/platform/graphql)
|
||||
- [Authentication](/platform/authentication)
|
||||
- [Storage](/platform/storage)
|
||||
- [Serverless Functions](/platform/serverless-functions)
|
||||
- [Nhost](/platform/nhost)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"label": "Nhost",
|
||||
"position": 6
|
||||
"position": 7
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ title: 'Nhost CLI'
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
Nhost CLI lets you run Nhost's development environment locally on macOS, Linux and Windows.
|
||||
|
||||
---
|
||||
@@ -28,10 +31,23 @@ To run serverless functions locally, you must have the appropriate runtimes inst
|
||||
|
||||
For Node.js, you will also need to have [express](https://www.npmjs.com/package/express) installed in your repository:
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="npm" label="npm" default>
|
||||
|
||||
```bash
|
||||
npm install --save-dev express @types/express
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="yarn" label="Yarn">
|
||||
|
||||
```bash
|
||||
yarn add -D express @types/express
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
[Read more about runtimes](/platform/serverless-functions)
|
||||
|
||||
---
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
"label": "Serverless Functions",
|
||||
"position": 5,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"slug": "/platform/serverless-functions"
|
||||
}
|
||||
"position": 6
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 'Creating functions'
|
||||
title: 'Serverless Functions'
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
@@ -39,19 +39,19 @@ HTTP endpoints are automatically generated based on the file structure under `fu
|
||||
|
||||
As such, given this file structure:
|
||||
|
||||
```js
|
||||
functions / index.js;
|
||||
functions / users / index.ts;
|
||||
functions / active.ts;
|
||||
functions / my - company.js;
|
||||
```text
|
||||
functions/index.js
|
||||
functions/users/index.ts
|
||||
functions/active.ts
|
||||
functions/my-company.js
|
||||
```
|
||||
|
||||
The following endpoints will be available:
|
||||
|
||||
- https://yourappid.nhost.run/v1/functions/ - (functions/index.js)
|
||||
- https://yourappid.nhost.run/v1/functions/users - (functions/users/index.ts)
|
||||
- https://yourappid.nhost.run/v1/functions/users/active - (functions/users/active.ts)
|
||||
- https://yourappid.nhost.run/v1/functions/my-company - (functions/my-company.js)
|
||||
- https://yourappid.nhost.run/v1/functions/ from `functions/index.js`.
|
||||
- https://yourappid.nhost.run/v1/functions/users from `functions/users/index.ts`.
|
||||
- https://yourappid.nhost.run/v1/functions/users/active from `functions/users/active.ts`.
|
||||
- https://yourappid.nhost.run/v1/functions/my-company from `functions/my-company.js`.
|
||||
|
||||
If you've used Netlify or Vercel, this routing logic will be familiar to you.
|
||||
|
||||
@@ -59,6 +59,4 @@ If you've used Netlify or Vercel, this routing logic will be familiar to you.
|
||||
|
||||
## Infrastructure
|
||||
|
||||
In production, serverless functions are deployed on AWS Lambda.
|
||||
|
||||
When developing locally, you must have the correct runtime installed on your machine.
|
||||
Serverless Functions are deployed to AWS Lambda in the same region as your app.
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
"label": "Storage",
|
||||
"position": 4,
|
||||
"link": { "type": "generated-index", "slug": "/platform/storage" }
|
||||
"position": 5
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
title: 'File storage'
|
||||
sidebar_position: 1
|
||||
title: 'Storage'
|
||||
---
|
||||
|
||||
Nhost stores and serves files of any type in your backend.
|
||||
@@ -11,7 +11,7 @@ sidebar_position: 3
|
||||
| HASURA_GRAPHQL_DATABASE_URL**\*** | [PostgreSQL connection URI](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING). Required to inject the `auth` schema into the database. | |
|
||||
| HASURA_GRAPHQL_GRAPHQL_URL**\*** | Hasura GraphQL endpoint. Required to manipulate account data. For instance: `https://graphql-engine:8080/v1/graphql` | |
|
||||
| HASURA_GRAPHQL_ADMIN_SECRET**\*** | Hasura GraphQL Admin Secret. Required to manipulate account data. | |
|
||||
| AUTH_HOST | Server host. [Docs](http://expressjs.com/en/5x/api.html#app.listen) | `0.0.0.0` |
|
||||
| AUTH_HOST | Server host. This option is available until Hasura-auth `v0.6.0`. [Docs](http://expressjs.com/en/5x/api.html#app.listen) | `0.0.0.0` |
|
||||
| AUTH_PORT | Server port. [Docs](http://expressjs.com/en/5x/api.html#app.listen) | `4000` |
|
||||
| AUTH_SERVER_URL | Server URL of where Hasura Backend Plus is running. This value is to used as a callback in email templates and for the OAuth authentication process. | |
|
||||
| AUTH_CLIENT_URL | URL of your frontend application. Used to redirect users to the right page once actions based on emails or OAuth succeed. | |
|
||||
|
||||
@@ -3,20 +3,28 @@ title: 'Configuration'
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
## Installation
|
||||
|
||||
With yarn:
|
||||
<Tabs>
|
||||
<TabItem value="npm" label="npm" default>
|
||||
|
||||
```bash
|
||||
yarn add @nhost/react @nhost/nextjs
|
||||
npm install @nhost/react @nhost/nextjs graphql
|
||||
```
|
||||
|
||||
With Npm:
|
||||
</TabItem>
|
||||
<TabItem value="yarn" label="Yarn">
|
||||
|
||||
```bash
|
||||
npm install @nhost/react @nhost/nextjs
|
||||
yarn add @nhost/react @nhost/nextjs graphql
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -3,20 +3,28 @@ title: 'Apollo GraphQL'
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
## Installation
|
||||
|
||||
With Yarn:
|
||||
<Tabs>
|
||||
<TabItem value="npm" label="npm" default>
|
||||
|
||||
```bash
|
||||
yarn add @nhost/react @nhost/react-apollo @apollo/client
|
||||
npm install @nhost/react @nhost/react-apollo @apollo/client graphql
|
||||
```
|
||||
|
||||
With Npm:
|
||||
</TabItem>
|
||||
<TabItem value="yarn" label="Yarn">
|
||||
|
||||
```bash
|
||||
npm install @nhost/react @nhost/react-apollo @apollo/client
|
||||
yarn add @nhost/react @nhost/react-apollo @apollo/client graphql
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Configuration
|
||||
|
||||
Let's add a `NhostApolloProvider`. Make sure the Apollo Provider is nested into `NhostReactProvider`, as it will need the Nhost context to determine the authentication headers to be sent to the GraphQL endpoint.
|
||||
|
||||
@@ -3,20 +3,28 @@ title: 'Getting started'
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
## Installation
|
||||
|
||||
With Yarn:
|
||||
<Tabs>
|
||||
<TabItem value="npm" label="npm" default>
|
||||
|
||||
```bash
|
||||
yarn add @nhost/react
|
||||
npm install @nhost/react graphql
|
||||
```
|
||||
|
||||
With npm:
|
||||
</TabItem>
|
||||
<TabItem value="yarn" label="Yarn">
|
||||
|
||||
```bash
|
||||
npm install @nhost/react
|
||||
yarn add @nhost/react graphql
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
---
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -3,6 +3,9 @@ title: 'Overview'
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
|
||||
Nhost SDK is the primary way of interacting with your Nhost app. It exposes a standard interface for each of the following services:
|
||||
|
||||
- GraphQL
|
||||
@@ -14,10 +17,23 @@ Nhost SDK is the primary way of interacting with your Nhost app. It exposes a st
|
||||
|
||||
Install the dependency:
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="npm" label="npm" default>
|
||||
|
||||
```bash
|
||||
npm install @nhost/nhost-js
|
||||
npm install @nhost/nhost-js graphql
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="yarn" label="Yarn">
|
||||
|
||||
```bash
|
||||
yarn add @nhost/nhost-js graphql
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
Then import and initialize a single `nhost` instance in your code:
|
||||
|
||||
```js
|
||||
|
||||
@@ -34,7 +34,7 @@ const config = {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
remarkPlugins: [require('mdx-mermaid')],
|
||||
// Please change this to your repo.
|
||||
editUrl: 'https://github.com/nhost/nhost/blob/main/docs/',
|
||||
editUrl: 'https://github.com/nhost/nhost/edit/main/docs/',
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve('./src/css/custom.css'),
|
||||
@@ -51,6 +51,12 @@ const config = {
|
||||
disableSwitch: false,
|
||||
respectPrefersColorScheme: true,
|
||||
},
|
||||
metadata: [
|
||||
{
|
||||
name: 'og:image',
|
||||
content: 'https://docs.nhost.io/img/splash.png',
|
||||
},
|
||||
],
|
||||
navbar: {
|
||||
hideOnScroll: true,
|
||||
logo: {
|
||||
|
||||
@@ -19,9 +19,8 @@ const sidebars = {
|
||||
label: 'Quick Start',
|
||||
type: 'category',
|
||||
collapsed: false,
|
||||
link: { id: 'get-started/quick-start/create-your-app', type: 'doc' },
|
||||
items: [
|
||||
'get-started/quick-start/create-your-app',
|
||||
'get-started/quick-start/index',
|
||||
'get-started/quick-start/schema',
|
||||
'get-started/quick-start/javascript-client',
|
||||
'get-started/quick-start/permissions',
|
||||
@@ -30,13 +29,11 @@ const sidebars = {
|
||||
{
|
||||
label: 'Authentication',
|
||||
type: 'category',
|
||||
link: { id: 'get-started/authentication/index', type: 'doc' },
|
||||
items: ['get-started/authentication/index'],
|
||||
},
|
||||
{
|
||||
label: 'CLI Workflow',
|
||||
type: 'category',
|
||||
link: { id: 'get-started/cli-workflow/index', type: 'doc' },
|
||||
items: [
|
||||
'get-started/cli-workflow/index',
|
||||
'get-started/cli-workflow/workflow-setup',
|
||||
@@ -48,7 +45,6 @@ const sidebars = {
|
||||
{
|
||||
label: 'Upgrade',
|
||||
type: 'category',
|
||||
link: { id: 'get-started/upgrade/index', type: 'doc' },
|
||||
items: ['get-started/upgrade/index'],
|
||||
},
|
||||
],
|
||||
|
||||
BIN
docs/static/img/splash.png
vendored
Normal file
BIN
docs/static/img/splash.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
@@ -14,12 +14,11 @@ services:
|
||||
auth:
|
||||
access_control:
|
||||
email:
|
||||
allowed_email_domains: ""
|
||||
allowed_emails: ""
|
||||
blocked_email_domains: ""
|
||||
blocked_emails: ""
|
||||
url:
|
||||
allowed_redirect_urls: ""
|
||||
allowed_email_domains: ''
|
||||
allowed_emails: ''
|
||||
blocked_email_domains: ''
|
||||
blocked_emails: ''
|
||||
allowed_redirect_urls: ''
|
||||
anonymous_users_enabled: false
|
||||
client_url: http://localhost:3000
|
||||
disable_new_users: false
|
||||
@@ -28,11 +27,11 @@ auth:
|
||||
passwordless:
|
||||
enabled: false
|
||||
signin_email_verified_required: true
|
||||
template_fetch_url: ""
|
||||
template_fetch_url: ''
|
||||
gravatar:
|
||||
default: ""
|
||||
default: ''
|
||||
enabled: true
|
||||
rating: ""
|
||||
rating: ''
|
||||
locale:
|
||||
allowed: en
|
||||
default: en
|
||||
@@ -41,65 +40,65 @@ auth:
|
||||
min_length: 3
|
||||
provider:
|
||||
apple:
|
||||
client_id: ""
|
||||
client_id: ''
|
||||
enabled: false
|
||||
key_id: ""
|
||||
private_key: ""
|
||||
key_id: ''
|
||||
private_key: ''
|
||||
scope: name,email
|
||||
team_id: ""
|
||||
team_id: ''
|
||||
bitbucket:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
facebook:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: email,photos,displayName
|
||||
github:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: user:email
|
||||
token_url: ""
|
||||
user_profile_url: ""
|
||||
token_url: ''
|
||||
user_profile_url: ''
|
||||
gitlab:
|
||||
base_url: ""
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
base_url: ''
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: read_user
|
||||
google:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: email,profile
|
||||
linkedin:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: r_emailaddress,r_liteprofile
|
||||
spotify:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: user-read-email,user-read-private
|
||||
strava:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
twilio:
|
||||
account_sid: ""
|
||||
auth_token: ""
|
||||
account_sid: ''
|
||||
auth_token: ''
|
||||
enabled: false
|
||||
messaging_service_id: ""
|
||||
messaging_service_id: ''
|
||||
twitter:
|
||||
consumer_key: ""
|
||||
consumer_secret: ""
|
||||
consumer_key: ''
|
||||
consumer_secret: ''
|
||||
enabled: false
|
||||
windows_live:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: wl.basic,wl.emails,wl.contacts_emails
|
||||
sms:
|
||||
@@ -108,13 +107,13 @@ auth:
|
||||
enabled: false
|
||||
provider:
|
||||
twilio:
|
||||
account_sid: ""
|
||||
auth_token: ""
|
||||
from: ""
|
||||
messaging_service_id: ""
|
||||
account_sid: ''
|
||||
auth_token: ''
|
||||
from: ''
|
||||
messaging_service_id: ''
|
||||
smtp:
|
||||
host: nhost_mailhog
|
||||
method: ""
|
||||
method: ''
|
||||
pass: password
|
||||
port: 1765
|
||||
secure: false
|
||||
|
||||
@@ -15,8 +15,7 @@ auth:
|
||||
allowed_emails: ''
|
||||
blocked_email_domains: ''
|
||||
blocked_emails: ''
|
||||
url:
|
||||
allowed_redirect_urls: ''
|
||||
allowed_redirect_urls: ''
|
||||
anonymous_users_enabled: false
|
||||
client_url: http://localhost:3000
|
||||
disable_new_users: false
|
||||
|
||||
@@ -6,12 +6,11 @@ services:
|
||||
auth:
|
||||
access_control:
|
||||
email:
|
||||
allowed_email_domains: ""
|
||||
allowed_emails: ""
|
||||
blocked_email_domains: ""
|
||||
blocked_emails: ""
|
||||
url:
|
||||
allowed_redirect_urls: ""
|
||||
allowed_email_domains: ''
|
||||
allowed_emails: ''
|
||||
blocked_email_domains: ''
|
||||
blocked_emails: ''
|
||||
allowed_redirect_urls: ''
|
||||
anonymous_users_enabled: false
|
||||
client_url: http://localhost:3000
|
||||
disable_new_users: false
|
||||
@@ -19,12 +18,12 @@ auth:
|
||||
enabled: false
|
||||
passwordless:
|
||||
enabled: false
|
||||
template_fetch_url: ""
|
||||
template_fetch_url: ''
|
||||
signin_email_verified_required: false
|
||||
gravatar:
|
||||
default: ""
|
||||
default: ''
|
||||
enabled: true
|
||||
rating: ""
|
||||
rating: ''
|
||||
locale:
|
||||
allowed: en
|
||||
default: en
|
||||
@@ -33,65 +32,65 @@ auth:
|
||||
min_length: 3
|
||||
provider:
|
||||
apple:
|
||||
client_id: ""
|
||||
client_id: ''
|
||||
enabled: false
|
||||
key_id: ""
|
||||
private_key: ""
|
||||
key_id: ''
|
||||
private_key: ''
|
||||
scope: name,email
|
||||
team_id: ""
|
||||
team_id: ''
|
||||
bitbucket:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
facebook:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: email,photos,displayName
|
||||
github:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: user:email
|
||||
token_url: ""
|
||||
user_profile_url: ""
|
||||
token_url: ''
|
||||
user_profile_url: ''
|
||||
gitlab:
|
||||
base_url: ""
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
base_url: ''
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: read_user
|
||||
google:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: email,profile
|
||||
linkedin:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: r_emailaddress,r_liteprofile
|
||||
spotify:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: user-read-email,user-read-private
|
||||
strava:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
twilio:
|
||||
account_sid: ""
|
||||
auth_token: ""
|
||||
account_sid: ''
|
||||
auth_token: ''
|
||||
enabled: false
|
||||
messaging_service_id: ""
|
||||
messaging_service_id: ''
|
||||
twitter:
|
||||
consumer_key: ""
|
||||
consumer_secret: ""
|
||||
consumer_key: ''
|
||||
consumer_secret: ''
|
||||
enabled: false
|
||||
windows_live:
|
||||
client_id: ""
|
||||
client_secret: ""
|
||||
client_id: ''
|
||||
client_secret: ''
|
||||
enabled: false
|
||||
scope: wl.basic,wl.emails,wl.contacts_emails
|
||||
sms:
|
||||
@@ -100,13 +99,13 @@ auth:
|
||||
enabled: false
|
||||
provider:
|
||||
twilio:
|
||||
account_sid: ""
|
||||
auth_token: ""
|
||||
from: ""
|
||||
messaging_service_id: ""
|
||||
account_sid: ''
|
||||
auth_token: ''
|
||||
from: ''
|
||||
messaging_service_id: ''
|
||||
smtp:
|
||||
host: nhost_mailhog
|
||||
method: ""
|
||||
method: ''
|
||||
pass: password
|
||||
port: 1586
|
||||
secure: false
|
||||
|
||||
@@ -7,7 +7,7 @@ services:
|
||||
environment:
|
||||
hasura_graphql_enable_remote_schema_permissions: false
|
||||
auth:
|
||||
version: 0.4.2
|
||||
version: 0.6.3
|
||||
auth:
|
||||
access_control:
|
||||
email:
|
||||
@@ -15,8 +15,7 @@ auth:
|
||||
allowed_emails: ''
|
||||
blocked_email_domains: ''
|
||||
blocked_emails: ''
|
||||
url:
|
||||
allowed_redirect_urls: ''
|
||||
allowed_redirect_urls: ''
|
||||
anonymous_users_enabled: false
|
||||
client_url: http://localhost:3000
|
||||
disable_new_users: false
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.5.10",
|
||||
"@nhost/react": "^0.5.0",
|
||||
"@nhost/react-apollo": "^4.0.10",
|
||||
"@nhost/react": "^0.5.3",
|
||||
"@nhost/react-apollo": "^4.0.13",
|
||||
"@rsuite/icons": "^1.0.2",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"less": "^4.1.2",
|
||||
@@ -15,7 +15,7 @@
|
||||
"react-json-view": "^1.21.3",
|
||||
"react-router": "^6.3.0",
|
||||
"react-router-dom": "^6.3.0",
|
||||
"rsuite": "^5.7.1"
|
||||
"rsuite": "^5.8.1"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -42,8 +42,8 @@
|
||||
"devDependencies": {
|
||||
"@types/react": "^17.0.43",
|
||||
"@types/react-dom": "^17.0.14",
|
||||
"@vitejs/plugin-react": "^1.3.0",
|
||||
"@vitejs/plugin-react": "^1.3.1",
|
||||
"typescript": "^4.6.3",
|
||||
"vite": "^2.9.1"
|
||||
"vite": "^2.9.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,28 +39,28 @@
|
||||
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.7.tgz#078d8b833fbbcc95286613be8c716cef2b519fa2"
|
||||
integrity sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==
|
||||
|
||||
"@babel/core@^7.17.8":
|
||||
version "7.17.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.8.tgz#3dac27c190ebc3a4381110d46c80e77efe172e1a"
|
||||
integrity sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==
|
||||
"@babel/core@^7.17.9":
|
||||
version "7.17.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.9.tgz#6bae81a06d95f4d0dec5bb9d74bbc1f58babdcfe"
|
||||
integrity sha512-5ug+SfZCpDAkVp9SFIZAzlW18rlzsOcJGaetCjkySnrXXDUw9AR8cDUm1iByTmdWM6yxX6/zycaV76w3YTF2gw==
|
||||
dependencies:
|
||||
"@ampproject/remapping" "^2.1.0"
|
||||
"@babel/code-frame" "^7.16.7"
|
||||
"@babel/generator" "^7.17.7"
|
||||
"@babel/generator" "^7.17.9"
|
||||
"@babel/helper-compilation-targets" "^7.17.7"
|
||||
"@babel/helper-module-transforms" "^7.17.7"
|
||||
"@babel/helpers" "^7.17.8"
|
||||
"@babel/parser" "^7.17.8"
|
||||
"@babel/helpers" "^7.17.9"
|
||||
"@babel/parser" "^7.17.9"
|
||||
"@babel/template" "^7.16.7"
|
||||
"@babel/traverse" "^7.17.3"
|
||||
"@babel/traverse" "^7.17.9"
|
||||
"@babel/types" "^7.17.0"
|
||||
convert-source-map "^1.7.0"
|
||||
debug "^4.1.0"
|
||||
gensync "^1.0.0-beta.2"
|
||||
json5 "^2.1.2"
|
||||
json5 "^2.2.1"
|
||||
semver "^6.3.0"
|
||||
|
||||
"@babel/generator@^7.17.3", "@babel/generator@^7.17.7":
|
||||
"@babel/generator@^7.17.3":
|
||||
version "7.17.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.7.tgz#8da2599beb4a86194a3b24df6c085931d9ee45ad"
|
||||
integrity sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==
|
||||
@@ -69,6 +69,15 @@
|
||||
jsesc "^2.5.1"
|
||||
source-map "^0.5.0"
|
||||
|
||||
"@babel/generator@^7.17.9":
|
||||
version "7.17.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.9.tgz#f4af9fd38fa8de143c29fce3f71852406fc1e2fc"
|
||||
integrity sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ==
|
||||
dependencies:
|
||||
"@babel/types" "^7.17.0"
|
||||
jsesc "^2.5.1"
|
||||
source-map "^0.5.0"
|
||||
|
||||
"@babel/helper-annotate-as-pure@^7.16.7":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862"
|
||||
@@ -102,6 +111,14 @@
|
||||
"@babel/template" "^7.16.7"
|
||||
"@babel/types" "^7.16.7"
|
||||
|
||||
"@babel/helper-function-name@^7.17.9":
|
||||
version "7.17.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12"
|
||||
integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==
|
||||
dependencies:
|
||||
"@babel/template" "^7.16.7"
|
||||
"@babel/types" "^7.17.0"
|
||||
|
||||
"@babel/helper-get-function-arity@^7.16.7":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz#ea08ac753117a669f1508ba06ebcc49156387419"
|
||||
@@ -166,13 +183,13 @@
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23"
|
||||
integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==
|
||||
|
||||
"@babel/helpers@^7.17.8":
|
||||
version "7.17.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.8.tgz#288450be8c6ac7e4e44df37bcc53d345e07bc106"
|
||||
integrity sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==
|
||||
"@babel/helpers@^7.17.9":
|
||||
version "7.17.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.9.tgz#b2af120821bfbe44f9907b1826e168e819375a1a"
|
||||
integrity sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q==
|
||||
dependencies:
|
||||
"@babel/template" "^7.16.7"
|
||||
"@babel/traverse" "^7.17.3"
|
||||
"@babel/traverse" "^7.17.9"
|
||||
"@babel/types" "^7.17.0"
|
||||
|
||||
"@babel/highlight@^7.16.7":
|
||||
@@ -184,11 +201,16 @@
|
||||
chalk "^2.0.0"
|
||||
js-tokens "^4.0.0"
|
||||
|
||||
"@babel/parser@^7.16.7", "@babel/parser@^7.17.3", "@babel/parser@^7.17.8":
|
||||
"@babel/parser@^7.16.7", "@babel/parser@^7.17.3":
|
||||
version "7.17.8"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.8.tgz#2817fb9d885dd8132ea0f8eb615a6388cca1c240"
|
||||
integrity sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==
|
||||
|
||||
"@babel/parser@^7.17.9":
|
||||
version "7.17.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.9.tgz#9c94189a6062f0291418ca021077983058e171ef"
|
||||
integrity sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg==
|
||||
|
||||
"@babel/plugin-syntax-jsx@^7.16.7":
|
||||
version "7.16.7"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz#50b6571d13f764266a113d77c82b4a6508bbe665"
|
||||
@@ -260,6 +282,22 @@
|
||||
debug "^4.1.0"
|
||||
globals "^11.1.0"
|
||||
|
||||
"@babel/traverse@^7.17.9":
|
||||
version "7.17.9"
|
||||
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.9.tgz#1f9b207435d9ae4a8ed6998b2b82300d83c37a0d"
|
||||
integrity sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.16.7"
|
||||
"@babel/generator" "^7.17.9"
|
||||
"@babel/helper-environment-visitor" "^7.16.7"
|
||||
"@babel/helper-function-name" "^7.17.9"
|
||||
"@babel/helper-hoist-variables" "^7.16.7"
|
||||
"@babel/helper-split-export-declaration" "^7.16.7"
|
||||
"@babel/parser" "^7.17.9"
|
||||
"@babel/types" "^7.17.0"
|
||||
debug "^4.1.0"
|
||||
globals "^11.1.0"
|
||||
|
||||
"@babel/types@^7.16.7", "@babel/types@^7.17.0":
|
||||
version "7.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b"
|
||||
@@ -296,31 +334,31 @@
|
||||
resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.3.1.tgz#b50a781709c81e10701004214340f25475a171a0"
|
||||
integrity sha512-zMM9Ds+SawiUkakS7y94Ymqx+S0ORzpG3frZirN3l+UlXUmSUR7hF4wxCVqW+ei94JzV5kt0uXBcoOEAuiydrw==
|
||||
|
||||
"@nhost/apollo@^0.3.7":
|
||||
version "0.3.7"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/apollo/-/apollo-0.3.7.tgz#761d3d60519df60caaa7220909ab11bd2c629e3a"
|
||||
integrity sha512-NH1WCC5D6K/Ft8/EXYIgeAhOBq5Gt1OtX9U9RzV2IqmVRGigDw+YlXr8P5GRPAzBeZUVWrM1wvBt+oBk8zw/7g==
|
||||
"@nhost/apollo@^0.4.0":
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/apollo/-/apollo-0.4.0.tgz#41f12b2fc4047fec27a6002d78f508f12fa5c78c"
|
||||
integrity sha512-s/kGInse3bFhHAQ+TLW5kZcsjCkB9EWAMJGnLeUQYF/BoVs43uZK7WnB0WkRkafKBe77NKGxDtHIe4tL2gFzMw==
|
||||
dependencies:
|
||||
"@nhost/core" "^0.3.8"
|
||||
"@nhost/core" "^0.3.10"
|
||||
graphql "16"
|
||||
subscriptions-transport-ws "^0.11.0"
|
||||
graphql-ws "^5.7.0"
|
||||
|
||||
"@nhost/core@^0.3.8":
|
||||
version "0.3.8"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/core/-/core-0.3.8.tgz#0269ab5daa36b1bdd2b2864c174809a86d4d2a7a"
|
||||
integrity sha512-6mOv23H16n0YN0voXdXSGS18rUELe1YI2+HXMRlaeksCib4BvSf28lsideEOjFnyfHA3Y4wAX1SMxnyaEj1qaQ==
|
||||
"@nhost/core@^0.3.10":
|
||||
version "0.3.10"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/core/-/core-0.3.10.tgz#c6ab6b524e60261565ce8ec9c17d3fb3b0853a21"
|
||||
integrity sha512-ng71+36Utz16uMPK5MvIKeQRFVKv9jraDH6Uj/thX7iZQRV5I4mXVaTMwlyL8Jlk8PLxQmYV2c7Q8SB0qRPgKA==
|
||||
dependencies:
|
||||
axios "^0.25.0"
|
||||
broadcast-channel "^4.10.0"
|
||||
js-cookie "^3.0.1"
|
||||
xstate "^4.30.5"
|
||||
|
||||
"@nhost/hasura-auth-js@^1.0.9":
|
||||
version "1.0.9"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/hasura-auth-js/-/hasura-auth-js-1.0.9.tgz#7e5cfe7a59b18778352dd6d2bef368c765ce9886"
|
||||
integrity sha512-d0UDfakzUO9N0/4RRy9NptoOLgpcRmr2F5XxVVzqLYX67+XzZoqT+LMhOF8spKP4+JqFlKFgqbNulmuRRc5FfA==
|
||||
"@nhost/hasura-auth-js@^1.0.11":
|
||||
version "1.0.11"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/hasura-auth-js/-/hasura-auth-js-1.0.11.tgz#03ca481d28af4c3a0919f9a5e0924c619fcbc076"
|
||||
integrity sha512-IzVT7IHSr/KezMJnhGDfsVrUU7E6azqK1Fbilf8hKKmPxaYJniXpZDsAp+zgSUada4H+XaULwn9nIjlzl22jZQ==
|
||||
dependencies:
|
||||
"@nhost/core" "^0.3.8"
|
||||
"@nhost/core" "^0.3.10"
|
||||
|
||||
"@nhost/hasura-storage-js@^0.2.0":
|
||||
version "0.2.0"
|
||||
@@ -329,30 +367,30 @@
|
||||
dependencies:
|
||||
axios "^0.21.1"
|
||||
|
||||
"@nhost/nhost-js@^1.0.9":
|
||||
version "1.0.9"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/nhost-js/-/nhost-js-1.0.9.tgz#a1b0bc0c35e15ade2867da4d211b1f81f3bc5e28"
|
||||
integrity sha512-/SZLk3Be560scVAbUswcRSE4RMwf6M7xanbNLqGUuI/sr1Ir253WPhaD2YWXZChP1v2LBzONhdJNI2g7u1NzoA==
|
||||
"@nhost/nhost-js@^1.1.0":
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/nhost-js/-/nhost-js-1.1.0.tgz#0ff96c10cbc95ce247ce5a8cb8e7106322ac2bd6"
|
||||
integrity sha512-897rwGFeXTySwhlsPbyURtMTNha88vVORVM5URlsfgNajK9mhmrANUj5tLQ8dlivomf8fWrbyW1ieTZdulDiCA==
|
||||
dependencies:
|
||||
"@nhost/hasura-auth-js" "^1.0.9"
|
||||
"@nhost/hasura-auth-js" "^1.0.11"
|
||||
"@nhost/hasura-storage-js" "^0.2.0"
|
||||
axios "^0.23.0"
|
||||
jwt-decode "^3.1.2"
|
||||
query-string "^7.0.1"
|
||||
|
||||
"@nhost/react-apollo@^4.0.10":
|
||||
version "4.0.10"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/react-apollo/-/react-apollo-4.0.10.tgz#d28819019f35aff7fb69a3b485489ab0492643e1"
|
||||
integrity sha512-MTIBk9aQVCIfVR17eEKM6ssELadpDhIAh2ERjaZY8+i9KMgVyjEt0s4842nl1Bwq7OFIXf5GRykr3RtTjuT/Ug==
|
||||
"@nhost/react-apollo@^4.0.13":
|
||||
version "4.0.13"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/react-apollo/-/react-apollo-4.0.13.tgz#f79eee522c76db2d03c2bf1e67174a632e85ac7c"
|
||||
integrity sha512-L3lTbFPFRm89cink9b08xhT50DbUe63llFW33nkO0ub2W4UDyMtYZszNhc+oJ3b7KNm30oH7sXggL2LXY75VMA==
|
||||
dependencies:
|
||||
"@nhost/apollo" "^0.3.7"
|
||||
"@nhost/apollo" "^0.4.0"
|
||||
|
||||
"@nhost/react@^0.5.0":
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/react/-/react-0.5.0.tgz#5276ae7e13691f32ceaa0e6ca2460ef2605820f6"
|
||||
integrity sha512-d89I3Q1Y6+9QJ6jP9yU9xrEJv8dCvTwll7tctd7emqZyPWGgInLpmZ9OA+/xrannowck5MsgaBdz0zxQ9bjJBA==
|
||||
"@nhost/react@^0.5.3":
|
||||
version "0.5.3"
|
||||
resolved "https://registry.yarnpkg.com/@nhost/react/-/react-0.5.3.tgz#bb2ccb86de919f6b1aee5fd2ec6bf0bf1dafee6d"
|
||||
integrity sha512-KRb7yOIHQDX+ErBaZq64EhF9OOpCGpgtETB3w/ODNkTnefCk5gr0uMnZzbvDfIXvvMJdQrsk2k1R7BslMZuSsw==
|
||||
dependencies:
|
||||
"@nhost/nhost-js" "^1.0.9"
|
||||
"@nhost/nhost-js" "^1.1.0"
|
||||
"@xstate/react" "^2.0.1"
|
||||
immer "^9.0.12"
|
||||
|
||||
@@ -423,18 +461,18 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39"
|
||||
integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==
|
||||
|
||||
"@vitejs/plugin-react@^1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-1.3.0.tgz#efd4b4383edc12780cd8d230c2daa9d266690bb9"
|
||||
integrity sha512-H+yIupjUE4a+E4oeWUv4xUJIMR0DWBIMUG/DYgvj0J9Vu1rdHAlJ5JdbI+N1KDUD7Ee2fZ1DMPZ/NBg6mXtoCw==
|
||||
"@vitejs/plugin-react@^1.3.1":
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-1.3.1.tgz#bf008adf33e713215cd4a6b94a75146dd6891975"
|
||||
integrity sha512-qQS8Y2fZCjo5YmDUplEXl3yn+aueiwxB7BaoQ4nWYJYR+Ai8NXPVLlkLobVMs5+DeyFyg9Lrz6zCzdX1opcvyw==
|
||||
dependencies:
|
||||
"@babel/core" "^7.17.8"
|
||||
"@babel/core" "^7.17.9"
|
||||
"@babel/plugin-transform-react-jsx" "^7.17.3"
|
||||
"@babel/plugin-transform-react-jsx-development" "^7.16.7"
|
||||
"@babel/plugin-transform-react-jsx-self" "^7.16.7"
|
||||
"@babel/plugin-transform-react-jsx-source" "^7.16.7"
|
||||
"@rollup/pluginutils" "^4.2.0"
|
||||
react-refresh "^0.11.0"
|
||||
react-refresh "^0.12.0"
|
||||
resolve "^1.22.0"
|
||||
|
||||
"@wry/context@^0.6.0":
|
||||
@@ -499,11 +537,6 @@ axios@^0.25.0:
|
||||
dependencies:
|
||||
follow-redirects "^1.14.7"
|
||||
|
||||
backo2@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/backo2/-/backo2-1.0.2.tgz#31ab1ac8b129363463e35b3ebb69f4dfcfba7947"
|
||||
integrity sha1-MasayLEpNjRj41s+u2n038+6eUc=
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||
@@ -816,11 +849,6 @@ estree-walker@^2.0.1:
|
||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"
|
||||
integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==
|
||||
|
||||
eventemitter3@^3.1.0:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7"
|
||||
integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==
|
||||
|
||||
eventemitter3@^4.0.4:
|
||||
version "4.0.7"
|
||||
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
|
||||
@@ -918,6 +946,11 @@ graphql-tag@^2.12.3:
|
||||
dependencies:
|
||||
tslib "^2.1.0"
|
||||
|
||||
graphql-ws@^5.7.0:
|
||||
version "5.7.0"
|
||||
resolved "https://registry.yarnpkg.com/graphql-ws/-/graphql-ws-5.7.0.tgz#4b9d7a0ee9555804582f27f5d7695d10aafdbdc8"
|
||||
integrity sha512-8yYuvnyqIjlJ/WfebOyu2GSOQeFauRxnfuTveY9yvrDGs2g3kR9Nv4gu40AKvRHbXlSJwTbMJ6dVxAtEyKwVRA==
|
||||
|
||||
graphql@16:
|
||||
version "16.3.0"
|
||||
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.3.0.tgz#a91e24d10babf9e60c706919bb182b53ccdffc05"
|
||||
@@ -996,11 +1029,6 @@ is-what@^3.14.1:
|
||||
resolved "https://registry.yarnpkg.com/is-what/-/is-what-3.14.1.tgz#e1222f46ddda85dead0fd1c9df131760e77755c1"
|
||||
integrity sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==
|
||||
|
||||
iterall@^1.2.1:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.3.0.tgz#afcb08492e2915cbd8a0884eb93a8c94d0d72fea"
|
||||
integrity sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==
|
||||
|
||||
js-cookie@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-3.0.1.tgz#9e39b4c6c2f56563708d7d31f6f5f21873a92414"
|
||||
@@ -1016,7 +1044,7 @@ jsesc@^2.5.1:
|
||||
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
|
||||
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
|
||||
|
||||
json5@^2.1.2:
|
||||
json5@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
|
||||
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
|
||||
@@ -1302,10 +1330,10 @@ react-lifecycles-compat@^3.0.4:
|
||||
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
|
||||
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==
|
||||
|
||||
react-refresh@^0.11.0:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046"
|
||||
integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==
|
||||
react-refresh@^0.12.0:
|
||||
version "0.12.0"
|
||||
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.12.0.tgz#28ac0a2c30ef2bb3433d5fd0621e69a6d774c3a4"
|
||||
integrity sha512-suLIhrU2IHKL5JEKR/fAwJv7bbeq4kJ+pJopf77jHwuR+HmJS/HbrPIGsTBUVfw7tXPOmYv7UJ7PCaN49e8x4A==
|
||||
|
||||
react-router-dom@^6.3.0:
|
||||
version "6.3.0"
|
||||
@@ -1392,10 +1420,10 @@ rsuite-table@^5.3.6:
|
||||
lodash "^4.17.21"
|
||||
react-is "^17.0.2"
|
||||
|
||||
rsuite@^5.7.1:
|
||||
version "5.7.1"
|
||||
resolved "https://registry.yarnpkg.com/rsuite/-/rsuite-5.7.1.tgz#2c50161e568cbf0074b42e7b65592b25a3b9412d"
|
||||
integrity sha512-vvqBadf9vJ49CW4gboFpj+Ol7M5sK7a72irwQxgxBxHBD2YEWUx9LQp137RIJV6w/nXg1P5yaObZULb5n77QoA==
|
||||
rsuite@^5.8.1:
|
||||
version "5.8.1"
|
||||
resolved "https://registry.yarnpkg.com/rsuite/-/rsuite-5.8.1.tgz#f7064d1ca10cde8268b2828ec084b34ff7f9a438"
|
||||
integrity sha512-rFE07c2Hn1i6+VTjru3iA/4YQm2cI9YjBnSP24+KrI4VuT5RsZdDfq/PeibcKg0A0zeUfkxxvx1OAmsK7H84Qw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.8.4"
|
||||
"@juggle/resize-observer" "^3.3.1"
|
||||
@@ -1483,17 +1511,6 @@ strict-uri-encode@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
|
||||
integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY=
|
||||
|
||||
subscriptions-transport-ws@^0.11.0:
|
||||
version "0.11.0"
|
||||
resolved "https://registry.yarnpkg.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.11.0.tgz#baf88f050cba51d52afe781de5e81b3c31f89883"
|
||||
integrity sha512-8D4C6DIH5tGiAIpp5I0wD/xRlNiZAPGHygzCe7VzyzUoxHtawzjNAY9SUTXU05/EY2NMY9/9GF0ycizkXr1CWQ==
|
||||
dependencies:
|
||||
backo2 "^1.0.2"
|
||||
eventemitter3 "^3.1.0"
|
||||
iterall "^1.2.1"
|
||||
symbol-observable "^1.0.4"
|
||||
ws "^5.2.0 || ^6.0.0 || ^7.0.0"
|
||||
|
||||
supports-color@^5.3.0:
|
||||
version "5.5.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
|
||||
@@ -1506,11 +1523,6 @@ supports-preserve-symlinks-flag@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
|
||||
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
|
||||
|
||||
symbol-observable@^1.0.4:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"
|
||||
integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==
|
||||
|
||||
symbol-observable@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205"
|
||||
@@ -1580,10 +1592,10 @@ use-subscription@^1.3.0:
|
||||
dependencies:
|
||||
object-assign "^4.1.1"
|
||||
|
||||
vite@^2.9.1:
|
||||
version "2.9.1"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-2.9.1.tgz#84bce95fae210a7beb566a0af06246748066b48f"
|
||||
integrity sha512-vSlsSdOYGcYEJfkQ/NeLXgnRv5zZfpAsdztkIrs7AZHV8RCMZQkwjo4DS5BnrYTqoWqLoUe1Cah4aVO4oNNqCQ==
|
||||
vite@^2.9.5:
|
||||
version "2.9.5"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-2.9.5.tgz#08ef37ac7a6d879c96f328b791732c9a00ea25ea"
|
||||
integrity sha512-dvMN64X2YEQgSXF1lYabKXw3BbN6e+BL67+P3Vy4MacnY+UzT1AfkHiioFSi9+uiDUiaDy7Ax/LQqivk6orilg==
|
||||
dependencies:
|
||||
esbuild "^0.14.27"
|
||||
postcss "^8.4.12"
|
||||
@@ -1610,11 +1622,6 @@ wrappy@1:
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||
|
||||
"ws@^5.2.0 || ^6.0.0 || ^7.0.0":
|
||||
version "7.5.7"
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67"
|
||||
integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==
|
||||
|
||||
xstate@^4.30.5:
|
||||
version "4.30.6"
|
||||
resolved "https://registry.yarnpkg.com/xstate/-/xstate-4.30.6.tgz#62b6dea37a500e0e1c0ff7c553a801eea5119554"
|
||||
|
||||
@@ -15,8 +15,7 @@ auth:
|
||||
allowed_emails: ''
|
||||
blocked_email_domains: ''
|
||||
blocked_emails: ''
|
||||
url:
|
||||
allowed_redirect_urls: ''
|
||||
allowed_redirect_urls: ''
|
||||
anonymous_users_enabled: false
|
||||
client_url: http://localhost:3000
|
||||
disable_new_users: false
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# @nhost/apollo
|
||||
|
||||
## 0.4.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7b5f00d]
|
||||
- Updated dependencies [58e1485]
|
||||
- @nhost/core@0.3.12
|
||||
|
||||
## 0.4.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0b1cb62]
|
||||
- @nhost/core@0.3.11
|
||||
|
||||
## 0.4.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- f6093a6: Use graphql-ws instead of subscriptions-transport-ws
|
||||
|
||||
## 0.3.9
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/apollo",
|
||||
"version": "0.3.9",
|
||||
"version": "0.4.2",
|
||||
"description": "Nhost Apollo Client library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -55,11 +55,11 @@
|
||||
"dependencies": {
|
||||
"@nhost/core": "workspace:^",
|
||||
"graphql": "16",
|
||||
"subscriptions-transport-ws": "^0.11.0"
|
||||
"graphql-ws": "^5.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@apollo/client": "^3.5.8",
|
||||
"xstate": "^4.30.5",
|
||||
"@nhost/nhost-js": "workspace:^"
|
||||
"@nhost/nhost-js": "workspace:^",
|
||||
"xstate": "^4.30.5"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
import { SubscriptionClient } from 'subscriptions-transport-ws'
|
||||
|
||||
import {
|
||||
ApolloClient,
|
||||
ApolloClientOptions,
|
||||
@@ -11,9 +9,11 @@ import {
|
||||
WatchQueryFetchPolicy
|
||||
} from '@apollo/client'
|
||||
import { setContext } from '@apollo/client/link/context'
|
||||
import { WebSocketLink } from '@apollo/client/link/ws'
|
||||
import { GraphQLWsLink } from '@apollo/client/link/subscriptions'
|
||||
import { getMainDefinition } from '@apollo/client/utilities'
|
||||
import { NhostClient } from '@nhost/nhost-js'
|
||||
|
||||
import { createRestartableClient } from './ws'
|
||||
const isBrowser = typeof window !== 'undefined'
|
||||
|
||||
export type NhostApolloClientOptions = {
|
||||
@@ -66,33 +66,31 @@ export const createApolloClient = ({
|
||||
}
|
||||
|
||||
const uri = backendUrl
|
||||
const wsUri = uri.startsWith('https') ? uri.replace(/^https/, 'wss') : uri.replace(/^http/, 'ws')
|
||||
|
||||
let webSocketClient: SubscriptionClient | null = null
|
||||
if (isBrowser) {
|
||||
webSocketClient = new SubscriptionClient(wsUri, {
|
||||
lazy: true,
|
||||
reconnect: true,
|
||||
const wsClient =
|
||||
isBrowser &&
|
||||
createRestartableClient({
|
||||
url: uri.startsWith('https') ? uri.replace(/^https/, 'wss') : uri.replace(/^http/, 'ws'),
|
||||
connectionParams: () => ({
|
||||
headers: getAuthHeaders()
|
||||
})
|
||||
})
|
||||
}
|
||||
const wsLink = wsClient && new GraphQLWsLink(wsClient)
|
||||
|
||||
const httplink = createHttpLink({
|
||||
uri
|
||||
})
|
||||
|
||||
const authLink = setContext((_, { headers }) => {
|
||||
const httpLink = setContext((_, { headers }) => {
|
||||
return {
|
||||
headers: {
|
||||
...headers,
|
||||
...getAuthHeaders()
|
||||
}
|
||||
}
|
||||
})
|
||||
}).concat(
|
||||
createHttpLink({
|
||||
uri
|
||||
})
|
||||
)
|
||||
|
||||
const link = webSocketClient
|
||||
const link = wsLink
|
||||
? split(
|
||||
({ query }) => {
|
||||
const mainDefinition = getMainDefinition(query)
|
||||
@@ -105,10 +103,10 @@ export const createApolloClient = ({
|
||||
|
||||
return kind === 'OperationDefinition' && operation === 'subscription'
|
||||
},
|
||||
new WebSocketLink(webSocketClient),
|
||||
authLink.concat(httplink)
|
||||
wsLink,
|
||||
httpLink
|
||||
)
|
||||
: authLink.concat(httplink)
|
||||
: httpLink
|
||||
|
||||
const apolloClientOptions: ApolloClientOptions<any> = {
|
||||
cache: cache || new InMemoryCache(),
|
||||
@@ -128,26 +126,18 @@ export const createApolloClient = ({
|
||||
|
||||
interpreter?.onTransition(async (state, event) => {
|
||||
const newToken = state.context.accessToken.value
|
||||
|
||||
if (token !== newToken) {
|
||||
if (['SIGNOUT', 'SIGNED_IN', 'TOKEN_CHANGED'].includes(event.type)) {
|
||||
token = newToken
|
||||
|
||||
if (isBrowser && webSocketClient) {
|
||||
if (webSocketClient.status === 1) {
|
||||
// must close first to avoid race conditions
|
||||
webSocketClient.close()
|
||||
|
||||
// @ts-expect-error
|
||||
webSocketClient.tryReconnect()
|
||||
if (event.type === 'SIGNOUT') {
|
||||
try {
|
||||
await client.resetStore()
|
||||
} catch (error) {
|
||||
console.error('Error resetting Apollo client cache')
|
||||
console.error(error)
|
||||
}
|
||||
|
||||
if (!newToken && event.type === 'SIGNOUT') {
|
||||
try {
|
||||
await client.resetStore()
|
||||
} catch (error) {
|
||||
console.error('Error resetting Apollo client cache')
|
||||
console.error(error)
|
||||
}
|
||||
} else {
|
||||
if (isBrowser && wsClient && wsClient.started()) {
|
||||
wsClient.restart()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
53
packages/apollo/src/ws.ts
Normal file
53
packages/apollo/src/ws.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
// * See https://github.com/enisdenjo/graphql-ws#graceful-restart
|
||||
import { Client, ClientOptions, createClient } from 'graphql-ws'
|
||||
|
||||
export interface RestartableClient extends Client {
|
||||
restart(): void
|
||||
started(): boolean
|
||||
}
|
||||
|
||||
export function createRestartableClient(options: ClientOptions): RestartableClient {
|
||||
let restartRequested = false
|
||||
let restart = () => {
|
||||
restartRequested = true
|
||||
}
|
||||
let _started = false
|
||||
const started = () => _started
|
||||
|
||||
const client = createClient({
|
||||
...options,
|
||||
on: {
|
||||
...options.on,
|
||||
connected: () => {
|
||||
_started = true
|
||||
},
|
||||
opened: (originalSocket) => {
|
||||
const socket = originalSocket as WebSocket
|
||||
options.on?.opened?.(socket)
|
||||
|
||||
restart = () => {
|
||||
if (socket.readyState === WebSocket.OPEN) {
|
||||
// if the socket is still open for the restart, do the restart
|
||||
socket.close(4205, 'Client Restart')
|
||||
} else {
|
||||
// otherwise the socket might've closed, indicate that you want
|
||||
// a restart on the next opened event
|
||||
restartRequested = true
|
||||
}
|
||||
}
|
||||
|
||||
// just in case you were eager to restart
|
||||
if (restartRequested) {
|
||||
restartRequested = false
|
||||
restart()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
return {
|
||||
...client,
|
||||
restart: () => restart(),
|
||||
started
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,23 @@
|
||||
# @nhost/core
|
||||
|
||||
## 0.3.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 7b5f00d: Avoid error when BroadcastChannell is not available
|
||||
- 58e1485: Fix invalid password and email errors on sign up
|
||||
When signin up, an invalid password was returning the `invalid-email` error, and an invalid email was returning `invalid-password`.
|
||||
This is now in order.
|
||||
|
||||
## 0.3.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0b1cb62: Use native `BroadcastChannel` instead of the `broadcast-channel` package
|
||||
The `broadcast-channel` depends on `node-gyp-build`, which can cause issues when deploying on Vercel as it is a native dependency.
|
||||
The added value of `broadcast-channel` is to be able to communicate the change of authentication state accross processes in a NodeJs / Electron environment, but this is considered an edge case for now.
|
||||
See [Vercel official documentation](https://vercel.com/support/articles/why-does-my-serverless-function-work-locally-but-not-when-deployed#native-dependencies).
|
||||
|
||||
## 0.3.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/core",
|
||||
"version": "0.3.10",
|
||||
"version": "0.3.12",
|
||||
"description": "Nhost core client library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -50,7 +50,6 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"axios": "^0.25.0",
|
||||
"broadcast-channel": "^4.10.0",
|
||||
"js-cookie": "^3.0.1",
|
||||
"xstate": "^4.30.5"
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { BroadcastChannel } from 'broadcast-channel'
|
||||
import { interpret } from 'xstate'
|
||||
|
||||
import { MIN_TOKEN_REFRESH_INTERVAL } from './constants'
|
||||
@@ -45,13 +44,17 @@ export class AuthClient {
|
||||
}
|
||||
|
||||
if (typeof window !== 'undefined' && autoSignIn) {
|
||||
this._channel = new BroadcastChannel<string>('nhost')
|
||||
this._channel.addEventListener('message', (token) => {
|
||||
const existingToken = this.interpreter?.state.context.refreshToken
|
||||
if (this.interpreter && token !== existingToken) {
|
||||
this.interpreter.send({ type: 'TRY_TOKEN', token })
|
||||
}
|
||||
})
|
||||
try {
|
||||
this._channel = new BroadcastChannel('nhost')
|
||||
this._channel.addEventListener('message', (token) => {
|
||||
const existingToken = this.interpreter?.state.context.refreshToken
|
||||
if (this.interpreter && token.data !== existingToken) {
|
||||
this.interpreter.send({ type: 'TRY_TOKEN', token: token.data })
|
||||
}
|
||||
})
|
||||
} catch (error) {
|
||||
// * BroadcastChannel is not available e.g. react-native
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { AxiosRequestConfig, AxiosResponse } from 'axios'
|
||||
import { BroadcastChannel } from 'broadcast-channel'
|
||||
import { assign, createMachine, send } from 'xstate'
|
||||
|
||||
import {
|
||||
@@ -529,10 +528,10 @@ export const createAuthMachine = ({
|
||||
errors: ({ errors: { registration, ...errors } }) => errors
|
||||
}),
|
||||
saveInvalidSignUpPassword: assign({
|
||||
errors: ({ errors }) => ({ ...errors, registration: INVALID_EMAIL_ERROR })
|
||||
errors: ({ errors }) => ({ ...errors, registration: INVALID_PASSWORD_ERROR })
|
||||
}),
|
||||
saveInvalidSignUpEmail: assign({
|
||||
errors: ({ errors }) => ({ ...errors, registration: INVALID_PASSWORD_ERROR })
|
||||
errors: ({ errors }) => ({ ...errors, registration: INVALID_EMAIL_ERROR })
|
||||
}),
|
||||
saveNoMfaTicketError: assign({
|
||||
errors: ({ errors }) => ({ ...errors, registration: NO_MFA_TICKET_ERROR })
|
||||
@@ -660,9 +659,13 @@ export const createAuthMachine = ({
|
||||
// TODO remove the hash. For the moment, it is kept to avoid regression from the current SDK.
|
||||
// * Then, only `refreshToken` will be in the hash, while `type` will be sent by hasura-auth as a query parameter
|
||||
// window.history.pushState({}, '', location.pathname)
|
||||
const channel = new BroadcastChannel('nhost')
|
||||
// ? broadcat session instead of token ?
|
||||
channel.postMessage(refreshToken)
|
||||
try {
|
||||
const channel = new BroadcastChannel('nhost')
|
||||
// ? broadcat session instead of token ?
|
||||
channel.postMessage(refreshToken)
|
||||
} catch (error) {
|
||||
// * BroadcastChannel is not available e.g. react-native
|
||||
}
|
||||
return { session }
|
||||
},
|
||||
importRefreshToken: async () => {
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
# @nhost/hasura-auth-js
|
||||
|
||||
## 1.0.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [7b5f00d]
|
||||
- Updated dependencies [58e1485]
|
||||
- @nhost/core@0.3.12
|
||||
|
||||
## 1.0.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [0b1cb62]
|
||||
- @nhost/core@0.3.11
|
||||
|
||||
## 1.0.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/hasura-auth-js",
|
||||
"version": "1.0.11",
|
||||
"version": "1.0.13",
|
||||
"description": "Hasura-auth client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,28 @@
|
||||
# @nhost/nextjs
|
||||
|
||||
## 1.0.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@1.1.2
|
||||
- @nhost/react@0.5.5
|
||||
|
||||
## 1.0.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@1.1.1
|
||||
- @nhost/react@0.5.4
|
||||
|
||||
## 1.0.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ab06e96]
|
||||
- Updated dependencies [ccba0b5]
|
||||
- @nhost/nhost-js@1.1.0
|
||||
- @nhost/react@0.5.3
|
||||
|
||||
## 1.0.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nextjs",
|
||||
"version": "1.0.13",
|
||||
"version": "1.0.16",
|
||||
"description": "Nhost NextJS library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,43 @@
|
||||
# @nhost/nhost-js
|
||||
|
||||
## 1.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/hasura-auth-js@1.0.13
|
||||
|
||||
## 1.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/hasura-auth-js@1.0.12
|
||||
|
||||
## 1.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- ccba0b5: Add `graphql-tag` support for GraphQL client
|
||||
It is now possible to use a `graphql-tag` argument with `nhost.graphql.request`:
|
||||
|
||||
```js
|
||||
import gql from 'graphql-tag'
|
||||
|
||||
const QUERY = gql`
|
||||
query {
|
||||
books {
|
||||
id
|
||||
title
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
const { data, error } = await nhost.graphql.request(QUERY)
|
||||
```
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- ab06e96: Add generic types for NhostFunctionsClient and NhostGraphqlClient request method return type and variables.
|
||||
|
||||
## 1.0.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nhost-js",
|
||||
"version": "1.0.11",
|
||||
"version": "1.1.2",
|
||||
"description": "Nhost JavaScript SDK",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -59,6 +59,10 @@
|
||||
"query-string": "^7.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@nhost/core": "workspace:^"
|
||||
"@nhost/core": "workspace:^",
|
||||
"graphql": "16"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0"
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios'
|
||||
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'
|
||||
|
||||
import { FunctionCallResponse } from '../types'
|
||||
export interface NhostFunctionsConstructorParams {
|
||||
@@ -18,7 +18,11 @@ export class NhostFunctionsClient {
|
||||
})
|
||||
}
|
||||
|
||||
async call(url: string, data: any, config?: AxiosRequestConfig): Promise<FunctionCallResponse> {
|
||||
async call<T = unknown, D = any>(
|
||||
url: string,
|
||||
data: D,
|
||||
config?: AxiosRequestConfig
|
||||
): Promise<FunctionCallResponse<T>> {
|
||||
const headers = {
|
||||
...this.generateAccessTokenHeaders(),
|
||||
...config?.headers
|
||||
@@ -26,7 +30,7 @@ export class NhostFunctionsClient {
|
||||
|
||||
let res
|
||||
try {
|
||||
res = await this.instance.post(url, data, { ...config, headers })
|
||||
res = await this.instance.post<T, AxiosResponse<T>, D>(url, data, { ...config, headers })
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
return { res: null, error }
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import axios, { AxiosInstance, AxiosRequestConfig } from 'axios'
|
||||
import type { DocumentNode } from 'graphql'
|
||||
import { print } from 'graphql/language/printer'
|
||||
|
||||
import { GraphqlRequestResponse, GraphqlResponse } from '../types'
|
||||
|
||||
@@ -21,33 +23,47 @@ export class NhostGraphqlClient {
|
||||
})
|
||||
}
|
||||
|
||||
async request(
|
||||
document: string,
|
||||
variables?: any,
|
||||
async request<T = any, V = any>(
|
||||
document: string | DocumentNode,
|
||||
variables?: V,
|
||||
config?: AxiosRequestConfig
|
||||
): Promise<GraphqlRequestResponse> {
|
||||
): Promise<GraphqlRequestResponse<T>> {
|
||||
// add auth headers if any
|
||||
const headers = {
|
||||
...config?.headers,
|
||||
...this.generateAccessTokenHeaders()
|
||||
}
|
||||
|
||||
const operationName = ''
|
||||
|
||||
let responseData
|
||||
try {
|
||||
const res = await this.instance.post(
|
||||
const operationName = ''
|
||||
const res = await this.instance.post<GraphqlResponse<T>>(
|
||||
'',
|
||||
{
|
||||
operationName: operationName || undefined,
|
||||
query: document,
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
query: typeof document === 'string' ? document : print(document),
|
||||
variables
|
||||
},
|
||||
{ ...config, headers }
|
||||
)
|
||||
|
||||
responseData = res.data
|
||||
const responseData = res.data
|
||||
const { data } = responseData
|
||||
|
||||
if (responseData.errors) {
|
||||
return {
|
||||
data: null,
|
||||
error: responseData.errors
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof data !== 'object' || Array.isArray(data) || data === null) {
|
||||
return {
|
||||
data: null,
|
||||
error: new Error('incorrect response data from GraphQL server')
|
||||
}
|
||||
}
|
||||
|
||||
return { data, error: null }
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
return { data: null, error }
|
||||
@@ -58,24 +74,6 @@ export class NhostGraphqlClient {
|
||||
error: new Error('Unable to get do GraphQL request')
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof responseData !== 'object' || Array.isArray(responseData) || responseData === null) {
|
||||
return {
|
||||
data: null,
|
||||
error: new Error('incorrect response data from GraphQL server')
|
||||
}
|
||||
}
|
||||
|
||||
responseData = responseData as GraphqlResponse
|
||||
|
||||
if (responseData.errors) {
|
||||
return {
|
||||
data: null,
|
||||
error: responseData.errors
|
||||
}
|
||||
}
|
||||
|
||||
return { data: responseData.data, error: null }
|
||||
}
|
||||
|
||||
getUrl(): string {
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import type { AxiosResponse } from 'axios'
|
||||
|
||||
export type GraphqlRequestResponse =
|
||||
export type GraphqlRequestResponse<T = unknown> =
|
||||
| {
|
||||
data: null
|
||||
error: Error | object
|
||||
error: Error | object | object[]
|
||||
}
|
||||
| {
|
||||
data: unknown
|
||||
data: T
|
||||
error: null
|
||||
}
|
||||
|
||||
export type FunctionCallResponse =
|
||||
export type FunctionCallResponse<T = unknown> =
|
||||
| {
|
||||
res: AxiosResponse
|
||||
res: AxiosResponse<T>
|
||||
error: null
|
||||
}
|
||||
| {
|
||||
@@ -20,7 +20,7 @@ export type FunctionCallResponse =
|
||||
error: Error
|
||||
}
|
||||
|
||||
export interface GraphqlResponse {
|
||||
export interface GraphqlResponse<T = object> {
|
||||
errors?: object[]
|
||||
data?: object
|
||||
data?: T
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ const BACKEND_URL = 'http://localhost:1337'
|
||||
const nhost = new NhostClient({
|
||||
backendUrl: BACKEND_URL
|
||||
})
|
||||
|
||||
type User = { id: string; displayName: string }
|
||||
|
||||
describe('main tests', () => {
|
||||
it('getUrl()', async () => {
|
||||
const graphqlUrl = await nhost.graphql.getUrl()
|
||||
@@ -21,7 +24,7 @@ describe('main tests', () => {
|
||||
}
|
||||
}
|
||||
`
|
||||
const { data, error } = await nhost.graphql.request(document)
|
||||
const { data, error } = await nhost.graphql.request<{ users: User[] }>(document)
|
||||
|
||||
expect(error).toBeTruthy()
|
||||
expect(data).toBeNull()
|
||||
@@ -36,7 +39,7 @@ describe('main tests', () => {
|
||||
}
|
||||
}
|
||||
`
|
||||
const { data, error } = await nhost.graphql.request(
|
||||
const { data, error } = await nhost.graphql.request<{ users: User[] }>(
|
||||
document,
|
||||
{},
|
||||
{
|
||||
@@ -59,7 +62,7 @@ describe('main tests', () => {
|
||||
}
|
||||
}
|
||||
`
|
||||
const { data, error } = await nhost.graphql.request(
|
||||
const { data, error } = await nhost.graphql.request<{ user: User }, { id: string }>(
|
||||
document,
|
||||
{
|
||||
id: '5ccdb471-8ab2-4441-a3d1-f7f7146dda0c'
|
||||
@@ -84,7 +87,7 @@ describe('main tests', () => {
|
||||
}
|
||||
}
|
||||
`
|
||||
const { data, error } = await nhost.graphql.request(
|
||||
const { data, error } = await nhost.graphql.request<{ user: User }, { id: string }>(
|
||||
document,
|
||||
{
|
||||
id: 'not-a-uuid'
|
||||
@@ -109,7 +112,7 @@ describe('main tests', () => {
|
||||
}
|
||||
}
|
||||
`
|
||||
const { data, error } = await nhost.graphql.request(
|
||||
const { data, error } = await nhost.graphql.request<{ user: User }>(
|
||||
document,
|
||||
{},
|
||||
{
|
||||
|
||||
@@ -1,5 +1,28 @@
|
||||
# @nhost/react-apollo
|
||||
|
||||
## 4.0.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/apollo@0.4.2
|
||||
- @nhost/react@0.5.5
|
||||
|
||||
## 4.0.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/apollo@0.4.1
|
||||
- @nhost/react@0.5.4
|
||||
|
||||
## 4.0.13
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- f6093a6: Introduce useAuthSubscription
|
||||
- Updated dependencies [f6093a6]
|
||||
- @nhost/apollo@0.4.0
|
||||
- @nhost/react@0.5.3
|
||||
|
||||
## 4.0.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-apollo",
|
||||
"version": "4.0.12",
|
||||
"version": "4.0.15",
|
||||
"description": "Nhost React Apollo client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -2,8 +2,10 @@ import {
|
||||
DocumentNode,
|
||||
OperationVariables,
|
||||
QueryHookOptions,
|
||||
SubscriptionHookOptions,
|
||||
TypedDocumentNode,
|
||||
useQuery
|
||||
useQuery,
|
||||
useSubscription
|
||||
} from '@apollo/client'
|
||||
import { useAuthenticated } from '@nhost/react'
|
||||
|
||||
@@ -16,11 +18,22 @@ export function useAuthQuery<TData = any, TVariables = OperationVariables>(
|
||||
return useQuery(query, newOptions)
|
||||
}
|
||||
|
||||
export function useAuthSubscription<TData = any, TVariables = OperationVariables>(
|
||||
subscription: DocumentNode | TypedDocumentNode<TData, TVariables>,
|
||||
options?: SubscriptionHookOptions<TData, TVariables>
|
||||
) {
|
||||
const isAuthenticated = useAuthenticated()
|
||||
const newOptions: SubscriptionHookOptions<TData, TVariables> = {
|
||||
...options,
|
||||
skip: options?.skip || !isAuthenticated
|
||||
}
|
||||
return useSubscription(subscription, newOptions)
|
||||
}
|
||||
|
||||
// TODO consider other hooks
|
||||
/*
|
||||
- useAuthLazyQuery
|
||||
- useAuthMutation
|
||||
- useAuthSubscription
|
||||
- useRoleQuery
|
||||
- useRoleLazyQuery
|
||||
- useRoleMutation
|
||||
|
||||
@@ -1,5 +1,25 @@
|
||||
# @nhost/react
|
||||
|
||||
## 0.5.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@1.1.2
|
||||
|
||||
## 0.5.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@1.1.1
|
||||
|
||||
## 0.5.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [ab06e96]
|
||||
- Updated dependencies [ccba0b5]
|
||||
- @nhost/nhost-js@1.1.0
|
||||
|
||||
## 0.5.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react",
|
||||
"version": "0.5.2",
|
||||
"version": "0.5.5",
|
||||
"description": "Nhost React library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
117
pnpm-lock.yaml
generated
117
pnpm-lock.yaml
generated
@@ -120,26 +120,24 @@ importers:
|
||||
'@nhost/core': workspace:^
|
||||
'@nhost/nhost-js': workspace:^
|
||||
graphql: 15.7.2
|
||||
subscriptions-transport-ws: ^0.11.0
|
||||
graphql-ws: ^5.7.0
|
||||
xstate: ^4.30.5
|
||||
dependencies:
|
||||
'@nhost/core': link:../core
|
||||
graphql: 15.7.2
|
||||
subscriptions-transport-ws: 0.11.0_graphql@15.7.2
|
||||
graphql-ws: 5.7.0_graphql@15.7.2
|
||||
devDependencies:
|
||||
'@apollo/client': 3.5.10_f3f7eb5e21785ef7d5faca94c1a68824
|
||||
'@apollo/client': 3.5.10_graphql-ws@5.7.0+graphql@15.7.2
|
||||
'@nhost/nhost-js': link:../nhost-js
|
||||
xstate: 4.30.6
|
||||
|
||||
packages/core:
|
||||
specifiers:
|
||||
axios: ^0.25.0
|
||||
broadcast-channel: ^4.10.0
|
||||
js-cookie: ^3.0.1
|
||||
xstate: ^4.30.5
|
||||
dependencies:
|
||||
axios: 0.25.0
|
||||
broadcast-channel: 4.10.0
|
||||
js-cookie: 3.0.1
|
||||
xstate: 4.30.6
|
||||
|
||||
@@ -197,6 +195,7 @@ importers:
|
||||
'@nhost/hasura-auth-js': workspace:^
|
||||
'@nhost/hasura-storage-js': workspace:^
|
||||
axios: ^0.23.0
|
||||
graphql: 15.7.2
|
||||
jwt-decode: ^3.1.2
|
||||
query-string: ^7.0.1
|
||||
dependencies:
|
||||
@@ -207,6 +206,7 @@ importers:
|
||||
query-string: 7.1.1
|
||||
devDependencies:
|
||||
'@nhost/core': link:../core
|
||||
graphql: 15.7.2
|
||||
|
||||
packages/react:
|
||||
specifiers:
|
||||
@@ -390,7 +390,7 @@ packages:
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.4
|
||||
|
||||
/@apollo/client/3.5.10_f3f7eb5e21785ef7d5faca94c1a68824:
|
||||
/@apollo/client/3.5.10_graphql-ws@5.7.0+graphql@15.7.2:
|
||||
resolution: {integrity: sha512-tL3iSpFe9Oldq7gYikZK1dcYxp1c01nlSwtsMz75382HcI6fvQXyFXUCJTTK3wgO2/ckaBvRGw7VqjFREdVoRw==}
|
||||
peerDependencies:
|
||||
graphql: ^14.0.0 || ^15.0.0 || ^16.0.0
|
||||
@@ -411,10 +411,10 @@ packages:
|
||||
'@wry/trie': 0.3.1
|
||||
graphql: 15.7.2
|
||||
graphql-tag: 2.12.6_graphql@15.7.2
|
||||
graphql-ws: 5.7.0_graphql@15.7.2
|
||||
hoist-non-react-statics: 3.3.2
|
||||
optimism: 0.16.1
|
||||
prop-types: 15.8.1
|
||||
subscriptions-transport-ws: 0.11.0_graphql@15.7.2
|
||||
symbol-observable: 4.0.0
|
||||
ts-invariant: 0.9.4
|
||||
tslib: 2.3.1
|
||||
@@ -2899,6 +2899,7 @@ packages:
|
||||
engines: {node: '>=6.9.0'}
|
||||
dependencies:
|
||||
regenerator-runtime: 0.13.9
|
||||
dev: true
|
||||
|
||||
/@babel/runtime/7.17.8:
|
||||
resolution: {integrity: sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==}
|
||||
@@ -5780,10 +5781,6 @@ packages:
|
||||
- supports-color
|
||||
dev: true
|
||||
|
||||
/backo2/1.0.2:
|
||||
resolution: {integrity: sha1-MasayLEpNjRj41s+u2n038+6eUc=}
|
||||
dev: false
|
||||
|
||||
/bail/1.0.5:
|
||||
resolution: {integrity: sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==}
|
||||
dev: false
|
||||
@@ -5810,11 +5807,6 @@ packages:
|
||||
is-windows: 1.0.2
|
||||
dev: true
|
||||
|
||||
/big-integer/1.6.51:
|
||||
resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==}
|
||||
engines: {node: '>=0.6'}
|
||||
dev: false
|
||||
|
||||
/big.js/5.2.2:
|
||||
resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==}
|
||||
dev: false
|
||||
@@ -5902,19 +5894,6 @@ packages:
|
||||
wcwidth: 1.0.1
|
||||
dev: true
|
||||
|
||||
/broadcast-channel/4.10.0:
|
||||
resolution: {integrity: sha512-hOUh312XyHk6JTVyX9cyXaH1UYs+2gHVtnW16oQAu9FL7ALcXGXc/YoJWqlkV8vUn14URQPMmRi4A9q4UrwVEQ==}
|
||||
dependencies:
|
||||
'@babel/runtime': 7.17.2
|
||||
detect-node: 2.1.0
|
||||
microseconds: 0.2.0
|
||||
nano-time: 1.0.0
|
||||
oblivious-set: 1.0.0
|
||||
p-queue: 6.6.2
|
||||
rimraf: 3.0.2
|
||||
unload: 2.3.1
|
||||
dev: false
|
||||
|
||||
/browser-process-hrtime/1.0.0:
|
||||
resolution: {integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==}
|
||||
dev: true
|
||||
@@ -8369,10 +8348,6 @@ packages:
|
||||
require-like: 0.1.2
|
||||
dev: false
|
||||
|
||||
/eventemitter3/3.1.2:
|
||||
resolution: {integrity: sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==}
|
||||
dev: false
|
||||
|
||||
/eventemitter3/4.0.7:
|
||||
resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==}
|
||||
dev: false
|
||||
@@ -9038,6 +9013,15 @@ packages:
|
||||
tslib: 2.3.1
|
||||
dev: true
|
||||
|
||||
/graphql-ws/5.7.0_graphql@15.7.2:
|
||||
resolution: {integrity: sha512-8yYuvnyqIjlJ/WfebOyu2GSOQeFauRxnfuTveY9yvrDGs2g3kR9Nv4gu40AKvRHbXlSJwTbMJ6dVxAtEyKwVRA==}
|
||||
engines: {node: '>=10'}
|
||||
peerDependencies:
|
||||
graphql: '>=0.11 <=16'
|
||||
dependencies:
|
||||
graphql: 15.7.2
|
||||
dev: false
|
||||
|
||||
/graphql/15.7.2:
|
||||
resolution: {integrity: sha512-AnnKk7hFQFmU/2I9YSQf3xw44ctnSFCfp3zE0N6W174gqe9fWG/2rKaKxROK7CcI3XtERpjEKFqts8o319Kf7A==}
|
||||
engines: {node: '>= 10.x'}
|
||||
@@ -9990,10 +9974,6 @@ packages:
|
||||
istanbul-lib-report: 3.0.0
|
||||
dev: true
|
||||
|
||||
/iterall/1.3.0:
|
||||
resolution: {integrity: sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==}
|
||||
dev: false
|
||||
|
||||
/jest-changed-files/27.5.1:
|
||||
resolution: {integrity: sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==}
|
||||
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
|
||||
@@ -11100,10 +11080,6 @@ packages:
|
||||
picomatch: 2.3.1
|
||||
dev: false
|
||||
|
||||
/microseconds/0.2.0:
|
||||
resolution: {integrity: sha512-n7DHHMjR1avBbSpsTBj6fmMGh2AGrifVV4e+WYc3Q9lO+xnSZ3NyhcBND3vzzatt05LFhoKFRxrIyklmLlUtyA==}
|
||||
dev: false
|
||||
|
||||
/microsoft-capitalize/1.0.5:
|
||||
resolution: {integrity: sha512-iqDMU9J643BHg8Zp7EMZNLTp6Pgs2f1S2SMnCW2VlUqMs17xCZ5vwVjalBJEGVcUfG+/1ePqeEGcMW3VfzHK5A==}
|
||||
engines: {node: '>= 10'}
|
||||
@@ -11306,12 +11282,6 @@ packages:
|
||||
resolution: {integrity: sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==}
|
||||
dev: true
|
||||
|
||||
/nano-time/1.0.0:
|
||||
resolution: {integrity: sha1-sFVPaa2J4i0JB/ehKwmTpdlhN+8=}
|
||||
dependencies:
|
||||
big-integer: 1.6.51
|
||||
dev: false
|
||||
|
||||
/nanoid/3.3.1:
|
||||
resolution: {integrity: sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==}
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
@@ -11575,10 +11545,6 @@ packages:
|
||||
es-abstract: 1.19.1
|
||||
dev: true
|
||||
|
||||
/oblivious-set/1.0.0:
|
||||
resolution: {integrity: sha512-z+pI07qxo4c2CulUHCDf9lcqDlMSo72N/4rLUpRXf6fu+q8vjt8y0xS+Tlf8NTJDdTXHbdeO1n3MlbctwEoXZw==}
|
||||
dev: false
|
||||
|
||||
/obuf/1.1.2:
|
||||
resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==}
|
||||
dev: false
|
||||
@@ -11672,11 +11638,6 @@ packages:
|
||||
p-map: 2.1.0
|
||||
dev: true
|
||||
|
||||
/p-finally/1.0.0:
|
||||
resolution: {integrity: sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=}
|
||||
engines: {node: '>=4'}
|
||||
dev: false
|
||||
|
||||
/p-limit/1.3.0:
|
||||
resolution: {integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -11733,14 +11694,6 @@ packages:
|
||||
dependencies:
|
||||
aggregate-error: 3.1.0
|
||||
|
||||
/p-queue/6.6.2:
|
||||
resolution: {integrity: sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
eventemitter3: 4.0.7
|
||||
p-timeout: 3.2.0
|
||||
dev: false
|
||||
|
||||
/p-retry/4.6.1:
|
||||
resolution: {integrity: sha512-e2xXGNhZOZ0lfgR9kL34iGlU8N/KO0xZnQxVEwdeOvpqNDQfdnxIYizvWtK8RglUa3bGqI8g0R/BdfzLMxRkiA==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -11749,13 +11702,6 @@ packages:
|
||||
retry: 0.13.1
|
||||
dev: false
|
||||
|
||||
/p-timeout/3.2.0:
|
||||
resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==}
|
||||
engines: {node: '>=8'}
|
||||
dependencies:
|
||||
p-finally: 1.0.0
|
||||
dev: false
|
||||
|
||||
/p-try/1.0.0:
|
||||
resolution: {integrity: sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=}
|
||||
engines: {node: '>=4'}
|
||||
@@ -13977,23 +13923,6 @@ packages:
|
||||
resolution: {integrity: sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag==}
|
||||
dev: false
|
||||
|
||||
/subscriptions-transport-ws/0.11.0_graphql@15.7.2:
|
||||
resolution: {integrity: sha512-8D4C6DIH5tGiAIpp5I0wD/xRlNiZAPGHygzCe7VzyzUoxHtawzjNAY9SUTXU05/EY2NMY9/9GF0ycizkXr1CWQ==}
|
||||
deprecated: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
|
||||
peerDependencies:
|
||||
graphql: ^15.7.2 || ^16.0.0
|
||||
dependencies:
|
||||
backo2: 1.0.2
|
||||
eventemitter3: 3.1.2
|
||||
graphql: 15.7.2
|
||||
iterall: 1.3.0
|
||||
symbol-observable: 1.2.0
|
||||
ws: 7.5.7
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/supports-color/5.5.0:
|
||||
resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -14109,11 +14038,6 @@ packages:
|
||||
- react-native
|
||||
dev: false
|
||||
|
||||
/symbol-observable/1.2.0:
|
||||
resolution: {integrity: sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
dev: false
|
||||
|
||||
/symbol-observable/4.0.0:
|
||||
resolution: {integrity: sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==}
|
||||
engines: {node: '>=0.10'}
|
||||
@@ -14735,13 +14659,6 @@ packages:
|
||||
resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==}
|
||||
engines: {node: '>= 10.0.0'}
|
||||
|
||||
/unload/2.3.1:
|
||||
resolution: {integrity: sha512-MUZEiDqvAN9AIDRbbBnVYVvfcR6DrjCqeU2YQMmliFZl9uaBUjTkhuDQkBiyAy8ad5bx1TXVbqZ3gg7namsWjA==}
|
||||
dependencies:
|
||||
'@babel/runtime': 7.17.2
|
||||
detect-node: 2.1.0
|
||||
dev: false
|
||||
|
||||
/unpipe/1.0.0:
|
||||
resolution: {integrity: sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
||||
Reference in New Issue
Block a user