Compare commits
12 Commits
@nhost/rea
...
@nhost/rea
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
76ce7d7b6e | ||
|
|
538bfbcb3e | ||
|
|
07b35d1e5f | ||
|
|
2200a0ed07 | ||
|
|
df23d97126 | ||
|
|
104f149369 | ||
|
|
01228583a0 | ||
|
|
93309dd851 | ||
|
|
2cc18dcb51 | ||
|
|
3b48a62790 | ||
|
|
8897dec056 | ||
|
|
324dda8309 |
@@ -1,5 +1,18 @@
|
||||
# @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
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/dashboard",
|
||||
"version": "0.11.13",
|
||||
"version": "0.11.15",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
|
||||
@@ -213,7 +213,6 @@ export default function RuleValueInput({
|
||||
freeSolo={!isHasuraInput}
|
||||
autoSelect={!isHasuraInput}
|
||||
autoHighlight={isHasuraInput}
|
||||
open
|
||||
isOptionEqualToValue={(option, value) => {
|
||||
if (typeof value === 'string') {
|
||||
return option.value.toLowerCase() === (value as string).toLowerCase();
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/apollo
|
||||
|
||||
## 5.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@2.0.1
|
||||
|
||||
## 5.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/apollo",
|
||||
"version": "5.0.0",
|
||||
"version": "5.0.1",
|
||||
"description": "Nhost Apollo Client library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @nhost/react-apollo
|
||||
|
||||
## 5.0.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/apollo@5.0.1
|
||||
- @nhost/react@2.0.1
|
||||
|
||||
## 5.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-apollo",
|
||||
"version": "5.0.1",
|
||||
"version": "5.0.2",
|
||||
"description": "Nhost React Apollo client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/react-urql
|
||||
|
||||
## 2.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/react@2.0.1
|
||||
|
||||
## 2.0.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react-urql",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "Nhost React URQL client",
|
||||
"license": "MIT",
|
||||
"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:
|
||||
|
||||
```sh
|
||||
npm install @nhost/graphql-js
|
||||
npm install -D @graphql-codegen/cli @graphql-codegen/typescript-nhost
|
||||
yarn add @nhost/graphql-js graphql
|
||||
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 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:
|
||||
- http://localhost:1337/v1/graphql:
|
||||
headers:
|
||||
@@ -35,17 +45,27 @@ generates:
|
||||
- typescript-nhost
|
||||
```
|
||||
|
||||
Add the codegen script to `package.json`:
|
||||
|
||||
```json filename="package.json"
|
||||
{
|
||||
"scripts": {
|
||||
"codegen": "graphql-codegen"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Generate the schema:
|
||||
|
||||
```sh
|
||||
yarn graphql-codegen
|
||||
yarn run codegen
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```ts filename="./src/main.ts"
|
||||
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 })
|
||||
```
|
||||
@@ -137,4 +157,4 @@ giraffes.forEach((giraffe) => {
|
||||
|
||||
## 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_users.yaml"
|
||||
- "!include public_categories.yaml"
|
||||
- "!include public_tasks.yaml"
|
||||
- "!include public_todos.yaml"
|
||||
- "!include storage_buckets.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",
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.2",
|
||||
"description": "Nhost GraphQL client",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
@@ -69,6 +69,9 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@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/hasura-auth-js": "workspace:*",
|
||||
"graphql": "16.6.0",
|
||||
|
||||
@@ -44,7 +44,7 @@ export type FieldArgs<
|
||||
Schema extends GenericSchema,
|
||||
OperationType extends OperationTypes,
|
||||
FieldName extends string,
|
||||
Suffix extends string = `_${Capitalize<FieldName>}Args`
|
||||
Suffix extends string = `_${CapitalizeSnakeCase<FieldName>}Args`
|
||||
> = Schema['types'][`${RootOperationName<Schema, OperationType>}${Suffix}`]
|
||||
|
||||
export type OperationRootTypeOf<
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
generates:
|
||||
./schemas/hasura.ts:
|
||||
./tests/schemas/hasura.ts:
|
||||
schema: http://localhost:1337/v1/graphql
|
||||
config:
|
||||
scalars:
|
||||
@@ -14,11 +14,11 @@ generates:
|
||||
- typescript-nhost
|
||||
- add:
|
||||
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
|
||||
plugins:
|
||||
- typescript-nhost
|
||||
./schemas/swapi.ts:
|
||||
./tests/schemas/swapi.ts:
|
||||
schema: https://swapi-graphql.netlify.app/.netlify/functions/index
|
||||
plugins:
|
||||
- typescript-nhost
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -42,3 +42,9 @@ client.mutation.insertTodo()
|
||||
|
||||
// * Optional parameters
|
||||
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
|
||||
|
||||
## 1.13.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/react@2.0.1
|
||||
|
||||
## 1.13.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nextjs",
|
||||
"version": "1.13.6",
|
||||
"version": "1.13.7",
|
||||
"description": "Nhost NextJS library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @nhost/nhost-js
|
||||
|
||||
## 2.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [2200a0ed]
|
||||
- Updated dependencies [3b48a627]
|
||||
- @nhost/graphql-js@0.0.2
|
||||
|
||||
## 2.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/nhost-js",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "Nhost JavaScript SDK",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/react
|
||||
|
||||
## 2.0.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@2.0.1
|
||||
|
||||
## 2.0.0
|
||||
|
||||
### Major Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/react",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "Nhost React library",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @nhost/vue
|
||||
|
||||
## 1.13.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- @nhost/nhost-js@2.0.1
|
||||
|
||||
## 1.13.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nhost/vue",
|
||||
"version": "1.13.6",
|
||||
"version": "1.13.7",
|
||||
"description": "Nhost Vue library",
|
||||
"license": "MIT",
|
||||
"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