Compare commits
12 Commits
@nhost/rea
...
@nhost/das
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76ce7d7b6e | ||
|
|
538bfbcb3e | ||
|
|
07b35d1e5f | ||
|
|
2200a0ed07 | ||
|
|
df23d97126 | ||
|
|
104f149369 | ||
|
|
01228583a0 | ||
|
|
93309dd851 | ||
|
|
2cc18dcb51 | ||
|
|
3b48a62790 | ||
|
|
8897dec056 | ||
|
|
324dda8309 |
@@ -1,5 +1,18 @@
|
|||||||
# @nhost/dashboard
|
# @nhost/dashboard
|
||||||
|
|
||||||
|
## 0.11.15
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @nhost/react-apollo@5.0.2
|
||||||
|
- @nhost/nextjs@1.13.7
|
||||||
|
|
||||||
|
## 0.11.14
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 2cc18dcb: fix(dashboard): prevent permission editor dropdown from being always open
|
||||||
|
|
||||||
## 0.11.13
|
## 0.11.13
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nhost/dashboard",
|
"name": "@nhost/dashboard",
|
||||||
"version": "0.11.13",
|
"version": "0.11.15",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
|
|||||||
@@ -213,7 +213,6 @@ export default function RuleValueInput({
|
|||||||
freeSolo={!isHasuraInput}
|
freeSolo={!isHasuraInput}
|
||||||
autoSelect={!isHasuraInput}
|
autoSelect={!isHasuraInput}
|
||||||
autoHighlight={isHasuraInput}
|
autoHighlight={isHasuraInput}
|
||||||
open
|
|
||||||
isOptionEqualToValue={(option, value) => {
|
isOptionEqualToValue={(option, value) => {
|
||||||
if (typeof value === 'string') {
|
if (typeof value === 'string') {
|
||||||
return option.value.toLowerCase() === (value as string).toLowerCase();
|
return option.value.toLowerCase() === (value as string).toLowerCase();
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @nhost/apollo
|
# @nhost/apollo
|
||||||
|
|
||||||
|
## 5.0.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @nhost/nhost-js@2.0.1
|
||||||
|
|
||||||
## 5.0.0
|
## 5.0.0
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nhost/apollo",
|
"name": "@nhost/apollo",
|
||||||
"version": "5.0.0",
|
"version": "5.0.1",
|
||||||
"description": "Nhost Apollo Client library",
|
"description": "Nhost Apollo Client library",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
# @nhost/react-apollo
|
# @nhost/react-apollo
|
||||||
|
|
||||||
|
## 5.0.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @nhost/apollo@5.0.1
|
||||||
|
- @nhost/react@2.0.1
|
||||||
|
|
||||||
## 5.0.1
|
## 5.0.1
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nhost/react-apollo",
|
"name": "@nhost/react-apollo",
|
||||||
"version": "5.0.1",
|
"version": "5.0.2",
|
||||||
"description": "Nhost React Apollo client",
|
"description": "Nhost React Apollo client",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @nhost/react-urql
|
# @nhost/react-urql
|
||||||
|
|
||||||
|
## 2.0.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @nhost/react@2.0.1
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nhost/react-urql",
|
"name": "@nhost/react-urql",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"description": "Nhost React URQL client",
|
"description": "Nhost React URQL client",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
8
packages/graphql-js/CHANGELOG.md
Normal file
8
packages/graphql-js/CHANGELOG.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# @nhost/graphql-js
|
||||||
|
|
||||||
|
## 0.0.2
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- 2200a0ed: Correct type inference on snake case operations
|
||||||
|
- 3b48a627: Improve readme instructions
|
||||||
@@ -16,15 +16,25 @@ Nhost GraphQL client.
|
|||||||
First, install `graphql-codegen` and the Nhost Typescript plugin:
|
First, install `graphql-codegen` and the Nhost Typescript plugin:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install @nhost/graphql-js
|
yarn add @nhost/graphql-js graphql
|
||||||
npm install -D @graphql-codegen/cli @graphql-codegen/typescript-nhost
|
yarn add -D @graphql-codegen/cli @graphql-codegen/typescript-nhost
|
||||||
|
```
|
||||||
|
|
||||||
|
Make sure strict null checks are enabled in `tsconfig.json`:
|
||||||
|
|
||||||
|
```json filename="tsconfig.json"
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"strictNullChecks": true
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configure the code generator
|
## Configure the code generator
|
||||||
|
|
||||||
Configure the code generator by adding a `graphql.config.yaml` file:
|
Configure the code generator by adding a `codegen.yaml` file:
|
||||||
|
|
||||||
```yaml filename="graphql.config.yaml"
|
```yaml filename="codegen.yaml"
|
||||||
schema:
|
schema:
|
||||||
- http://localhost:1337/v1/graphql:
|
- http://localhost:1337/v1/graphql:
|
||||||
headers:
|
headers:
|
||||||
@@ -35,17 +45,27 @@ generates:
|
|||||||
- typescript-nhost
|
- typescript-nhost
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Add the codegen script to `package.json`:
|
||||||
|
|
||||||
|
```json filename="package.json"
|
||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"codegen": "graphql-codegen"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
Generate the schema:
|
Generate the schema:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
yarn graphql-codegen
|
yarn run codegen
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```ts filename="./src/main.ts"
|
```ts filename="./src/main.ts"
|
||||||
import { NhostGraphqlClient } from '@nhost/graphql-js'
|
import { NhostGraphqlClient } from '@nhost/graphql-js'
|
||||||
import schema from './schema.ts'
|
import schema from './schema'
|
||||||
|
|
||||||
const client = new NhostGraphqlClient({ url: 'http://localhost:1337/v1/graphql', schema })
|
const client = new NhostGraphqlClient({ url: 'http://localhost:1337/v1/graphql', schema })
|
||||||
```
|
```
|
||||||
@@ -137,4 +157,4 @@ giraffes.forEach((giraffe) => {
|
|||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
[https://docs.nhost.io/reference/javascript/auth](https://docs.nhost.io/reference/javascript/graphql)
|
[https://docs.nhost.io/reference/javascript/graphql](https://docs.nhost.io/reference/javascript/graphql)
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
table:
|
||||||
|
name: tasks
|
||||||
|
schema: public
|
||||||
|
insert_permissions:
|
||||||
|
- role: public
|
||||||
|
permission:
|
||||||
|
check: {}
|
||||||
|
columns:
|
||||||
|
- description
|
||||||
|
- id
|
||||||
|
select_permissions:
|
||||||
|
- role: public
|
||||||
|
permission:
|
||||||
|
columns:
|
||||||
|
- description
|
||||||
|
- id
|
||||||
|
filter: {}
|
||||||
|
allow_aggregations: true
|
||||||
|
update_permissions:
|
||||||
|
- role: public
|
||||||
|
permission:
|
||||||
|
columns:
|
||||||
|
- description
|
||||||
|
- id
|
||||||
|
filter: {}
|
||||||
|
check: {}
|
||||||
|
delete_permissions:
|
||||||
|
- role: public
|
||||||
|
permission:
|
||||||
|
filter: {}
|
||||||
@@ -7,6 +7,7 @@
|
|||||||
- "!include auth_user_security_keys.yaml"
|
- "!include auth_user_security_keys.yaml"
|
||||||
- "!include auth_users.yaml"
|
- "!include auth_users.yaml"
|
||||||
- "!include public_categories.yaml"
|
- "!include public_categories.yaml"
|
||||||
|
- "!include public_tasks.yaml"
|
||||||
- "!include public_todos.yaml"
|
- "!include public_todos.yaml"
|
||||||
- "!include storage_buckets.yaml"
|
- "!include storage_buckets.yaml"
|
||||||
- "!include storage_files.yaml"
|
- "!include storage_files.yaml"
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
DROP TABLE "public"."tasks";
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CREATE TABLE "public"."tasks" ("id" uuid NOT NULL DEFAULT gen_random_uuid(), "description" text NOT NULL, PRIMARY KEY ("id") );
|
||||||
|
CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nhost/graphql-js",
|
"name": "@nhost/graphql-js",
|
||||||
"version": "0.0.1",
|
"version": "0.0.2",
|
||||||
"description": "Nhost GraphQL client",
|
"description": "Nhost GraphQL client",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -69,6 +69,9 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@faker-js/faker": "^7.6.0",
|
"@faker-js/faker": "^7.6.0",
|
||||||
|
"@graphql-codegen/add": "^4.0.1",
|
||||||
|
"@graphql-codegen/cli": "^3.1.0",
|
||||||
|
"@graphql-codegen/typescript-nhost": "^0.0.1",
|
||||||
"@nhost/docgen": "workspace:*",
|
"@nhost/docgen": "workspace:*",
|
||||||
"@nhost/hasura-auth-js": "workspace:*",
|
"@nhost/hasura-auth-js": "workspace:*",
|
||||||
"graphql": "16.6.0",
|
"graphql": "16.6.0",
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ export type FieldArgs<
|
|||||||
Schema extends GenericSchema,
|
Schema extends GenericSchema,
|
||||||
OperationType extends OperationTypes,
|
OperationType extends OperationTypes,
|
||||||
FieldName extends string,
|
FieldName extends string,
|
||||||
Suffix extends string = `_${Capitalize<FieldName>}Args`
|
Suffix extends string = `_${CapitalizeSnakeCase<FieldName>}Args`
|
||||||
> = Schema['types'][`${RootOperationName<Schema, OperationType>}${Suffix}`]
|
> = Schema['types'][`${RootOperationName<Schema, OperationType>}${Suffix}`]
|
||||||
|
|
||||||
export type OperationRootTypeOf<
|
export type OperationRootTypeOf<
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
generates:
|
generates:
|
||||||
./schemas/hasura.ts:
|
./tests/schemas/hasura.ts:
|
||||||
schema: http://localhost:1337/v1/graphql
|
schema: http://localhost:1337/v1/graphql
|
||||||
config:
|
config:
|
||||||
scalars:
|
scalars:
|
||||||
@@ -14,11 +14,11 @@ generates:
|
|||||||
- typescript-nhost
|
- typescript-nhost
|
||||||
- add:
|
- add:
|
||||||
content: 'export type JSONValue = string | number | boolean | { [x: string]: JSONValue } | Array<JSONValue>;'
|
content: 'export type JSONValue = string | number | boolean | { [x: string]: JSONValue } | Array<JSONValue>;'
|
||||||
./schemas/countries.ts:
|
./tests/schemas/countries.ts:
|
||||||
schema: https://countries.trevorblades.com/graphql
|
schema: https://countries.trevorblades.com/graphql
|
||||||
plugins:
|
plugins:
|
||||||
- typescript-nhost
|
- typescript-nhost
|
||||||
./schemas/swapi.ts:
|
./tests/schemas/swapi.ts:
|
||||||
schema: https://swapi-graphql.netlify.app/.netlify/functions/index
|
schema: https://swapi-graphql.netlify.app/.netlify/functions/index
|
||||||
plugins:
|
plugins:
|
||||||
- typescript-nhost
|
- typescript-nhost
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -42,3 +42,9 @@ client.mutation.insertTodo()
|
|||||||
|
|
||||||
// * Optional parameters
|
// * Optional parameters
|
||||||
client.query.todos({ variables: {} })
|
client.query.todos({ variables: {} })
|
||||||
|
|
||||||
|
// * Snake case mutation
|
||||||
|
client.mutation.insert_tasks({
|
||||||
|
variables: { objects: [{ description: 'a new task' }] },
|
||||||
|
select: { affected_rows: true }
|
||||||
|
})
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @nhost/nextjs
|
# @nhost/nextjs
|
||||||
|
|
||||||
|
## 1.13.7
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @nhost/react@2.0.1
|
||||||
|
|
||||||
## 1.13.6
|
## 1.13.6
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nhost/nextjs",
|
"name": "@nhost/nextjs",
|
||||||
"version": "1.13.6",
|
"version": "1.13.7",
|
||||||
"description": "Nhost NextJS library",
|
"description": "Nhost NextJS library",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -1,5 +1,13 @@
|
|||||||
# @nhost/nhost-js
|
# @nhost/nhost-js
|
||||||
|
|
||||||
|
## 2.0.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- Updated dependencies [2200a0ed]
|
||||||
|
- Updated dependencies [3b48a627]
|
||||||
|
- @nhost/graphql-js@0.0.2
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
### Major Changes
|
### Major Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nhost/nhost-js",
|
"name": "@nhost/nhost-js",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"description": "Nhost JavaScript SDK",
|
"description": "Nhost JavaScript SDK",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @nhost/react
|
# @nhost/react
|
||||||
|
|
||||||
|
## 2.0.1
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @nhost/nhost-js@2.0.1
|
||||||
|
|
||||||
## 2.0.0
|
## 2.0.0
|
||||||
|
|
||||||
### Major Changes
|
### Major Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nhost/react",
|
"name": "@nhost/react",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"description": "Nhost React library",
|
"description": "Nhost React library",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
# @nhost/vue
|
# @nhost/vue
|
||||||
|
|
||||||
|
## 1.13.7
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- @nhost/nhost-js@2.0.1
|
||||||
|
|
||||||
## 1.13.6
|
## 1.13.6
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@nhost/vue",
|
"name": "@nhost/vue",
|
||||||
"version": "1.13.6",
|
"version": "1.13.7",
|
||||||
"description": "Nhost Vue library",
|
"description": "Nhost Vue library",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
671
pnpm-lock.yaml
generated
671
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user