Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 0.17.2 #439

Merged
merged 40 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2bd52b2
disable `husky install` when installing mst-gql (#384)
jesse-savary Jul 19, 2022
c651743
feat: support [String] as query return type (#387)
smokku Jul 25, 2022
f70c54c
feat: Scaffold nullable lists as "type[] | null" (#389)
smokku Jul 26, 2022
48f52fd
Fix subscription when a DocumentNode is passed as query
Oct 13, 2022
aaa1ff2
Bump loader-utils from 2.0.2 to 2.0.4
dependabot[bot] Nov 16, 2022
48b2c44
Bump decode-uri-component from 0.2.0 to 0.2.2
dependabot[bot] Dec 3, 2022
eba2b7a
Bump json5 from 1.0.1 to 1.0.2
dependabot[bot] Jan 8, 2023
8ffd98e
Bump http-cache-semantics from 4.1.0 to 4.1.1
dependabot[bot] Feb 4, 2023
8464ff3
Bump sequelize from 5.22.5 to 6.29.0
dependabot[bot] Feb 24, 2023
c23e862
Bump dns-packet from 5.3.1 to 5.4.0
dependabot[bot] Mar 3, 2023
af8310f
Bump webpack from 5.73.0 to 5.76.1
dependabot[bot] Mar 15, 2023
8b5a5b8
chore: fix tests upgrade minor versions of mobx, mobx-state-tree
beepsoft Nov 13, 2023
fe4ab80
Merge pull request #424 from mobxjs/dev-0.17.2
beepsoft Nov 13, 2023
1a87fbf
Merge pull request #415 from mobxjs/dependabot/npm_and_yarn/dns-packe…
beepsoft Nov 13, 2023
0806353
Merge pull request #416 from mobxjs/dependabot/npm_and_yarn/webpack-5…
beepsoft Nov 13, 2023
d9d7272
Bump @babel/traverse from 7.18.2 to 7.23.3
dependabot[bot] Nov 13, 2023
1fbabe7
Merge pull request #431 from mobxjs/dependabot/npm_and_yarn/babel/tra…
beepsoft Nov 13, 2023
2bd9aec
Merge pull request #402 from mobxjs/dependabot/npm_and_yarn/loader-ut…
beepsoft Nov 13, 2023
5af4d83
Bump next from 12.2.2 to 13.5.0
dependabot[bot] Nov 13, 2023
4ade1d4
Merge pull request #405 from mobxjs/dependabot/npm_and_yarn/decode-ur…
beepsoft Nov 13, 2023
a9c24f2
Merge pull request #414 from mobxjs/dependabot/npm_and_yarn/sequelize…
beepsoft Nov 13, 2023
91db10a
Merge pull request #425 from mobxjs/dependabot/npm_and_yarn/next-13.5.0
beepsoft Nov 13, 2023
5e8115b
Bump semver from 5.7.1 to 5.7.2
dependabot[bot] Nov 13, 2023
eaaa07c
Merge pull request #426 from mobxjs/dependabot/npm_and_yarn/semver-5.7.2
beepsoft Nov 13, 2023
6968059
Merge pull request #410 from mobxjs/dependabot/npm_and_yarn/json5-1.0.2
beepsoft Nov 13, 2023
1b9b204
Bump word-wrap from 1.2.3 to 1.2.5
dependabot[bot] Nov 13, 2023
f82a8dd
Bump apollo-server-core from 2.25.4 to 2.26.2
dependabot[bot] Nov 13, 2023
425d72c
Merge pull request #427 from mobxjs/dependabot/npm_and_yarn/word-wrap…
beepsoft Nov 13, 2023
d3349aa
Merge pull request #428 from mobxjs/dependabot/npm_and_yarn/apollo-se…
beepsoft Nov 13, 2023
bfb2610
Merge pull request #412 from mobxjs/dependabot/npm_and_yarn/http-cach…
beepsoft Nov 13, 2023
88b9a98
Bump tough-cookie from 4.0.0 to 4.1.3
dependabot[bot] Nov 13, 2023
6da166c
Merge pull request #432 from mobxjs/dependabot/npm_and_yarn/tough-coo…
beepsoft Nov 13, 2023
05d18f5
Bump dottie from 2.0.3 to 2.0.6
dependabot[bot] Nov 13, 2023
1b1e3fa
Merge pull request #433 from mobxjs/dependabot/npm_and_yarn/dottie-2.0.6
beepsoft Nov 13, 2023
d509376
Merge branch 'development' into fix/subscribe-gql-tag
beepsoft Nov 14, 2023
0fcc38f
chore: fix stopping vite test
beepsoft Jan 27, 2024
511f375
Merge pull request #436 from mobxjs/vite-test-fix
beepsoft Jan 27, 2024
df92fb5
Merge pull request #396 from beepsoft/fix/subscribe-gql-tag
beepsoft Feb 3, 2024
11707a8
Allow running test actions by hand
beepsoft Feb 3, 2024
0b7b51f
Merge pull request #438 from mobxjs/extend-workflow
beepsoft Feb 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Test
on:
pull_request: {}
workflow_dispatch:

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ tmp_schema.json
.parcel-cache

# create-react-app test folder
tests/cra-test/cra-tmp
tests/vite-app-test/cra-tmp

# IntelliJ IDEA project files
.idea
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 0.17.2

- Fix tests, upgrade minor versions of mobx, mobx-state-tree

## 0.17.1

- Use [Pinst](https://www.npmjs.com/package/pinst) to fix `postinstall` scripts running when installing mst-gql
Expand Down
6 changes: 3 additions & 3 deletions examples/1-getting-started/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"arg": "^5.0.2",
"cors": "^2.8.5",
"express": "^4.17.1",
"graphql": "^16.5.0",
"graphql": "15.8.0",
"graphql-playground-middleware-express": "^1.7.21",
"graphql-tag": "^2.12.6",
"isomorphic-fetch": "^2.2.1",
"jest": "^27.0.6",
"mobx": "^6.6.0",
"mobx": "^6.10.2",
"mobx-react": "^7.5.0",
"mobx-state-tree": "^5.1.5",
"mobx-state-tree": "^5.3.0",
"mst-gql": "portal:../../",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
10 changes: 5 additions & 5 deletions examples/1-getting-started/src/app/models/RootStore.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { todoModelPrimitives, TodoModelSelector } from "./TodoModel.base"
export type CreateTodoInput = {
id: string
text: string
complete?: boolean
complete?: (boolean | null)
}
/* The TypeScript type that explicits the refs to other models in order to prevent a circular refs issue */
type Refs = {
Expand Down Expand Up @@ -45,20 +45,20 @@ export const RootStoreBase = withTypedRefs<Refs>()(MSTGQLStore
})
.actions(self => ({
queryTodos(variables?: { }, resultSelector: string | ((qb: TodoModelSelector) => TodoModelSelector) = todoModelPrimitives.toString(), options: QueryOptions = {}) {
return self.query<{ todos: TodoModelType[]}>(`query todos { todos {
return self.query<{ todos: TodoModelType[] }>(`query todos { todos {
${typeof resultSelector === "function" ? resultSelector(new TodoModelSelector()).toString() : resultSelector}
} }`, variables, options)
},
queryStringFromServer(variables: { string?: string }, options: QueryOptions = {}) {
queryStringFromServer(variables: { string?: (string | null) }, options: QueryOptions = {}) {
return self.query<{ stringFromServer: string }>(`query stringFromServer($string: String) { stringFromServer(string: $string) }`, variables, options)
},
mutateToggleTodo(variables: { id: string }, resultSelector: string | ((qb: TodoModelSelector) => TodoModelSelector) = todoModelPrimitives.toString(), optimisticUpdate?: () => void) {
return self.mutate<{ toggleTodo: TodoModelType}>(`mutation toggleTodo($id: ID!) { toggleTodo(id: $id) {
return self.mutate<{ toggleTodo: TodoModelType }>(`mutation toggleTodo($id: ID!) { toggleTodo(id: $id) {
${typeof resultSelector === "function" ? resultSelector(new TodoModelSelector()).toString() : resultSelector}
} }`, variables, optimisticUpdate)
},
mutateCreateTodo(variables: { todo: CreateTodoInput }, resultSelector: string | ((qb: TodoModelSelector) => TodoModelSelector) = todoModelPrimitives.toString(), optimisticUpdate?: () => void) {
return self.mutate<{ createTodo: TodoModelType}>(`mutation createTodo($todo: CreateTodoInput!) { createTodo(todo: $todo) {
return self.mutate<{ createTodo: TodoModelType }>(`mutation createTodo($todo: CreateTodoInput!) { createTodo(todo: $todo) {
${typeof resultSelector === "function" ? resultSelector(new TodoModelSelector()).toString() : resultSelector}
} }`, variables, optimisticUpdate)
},
Expand Down
5 changes: 3 additions & 2 deletions examples/2-scaffolding/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
"start": "yarn scaffold && yarn build"
},
"dependencies": {
"graphql": "^16.5.0",
"graphql-request": "^4.3.0",
"mobx": "^6.6.0",
"mobx-state-tree": "^5.1.5",
"mobx": "^6.10.2",
"mobx-state-tree": "^5.3.0",
"mst-gql": "portal:../../"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions examples/2-scaffolding/src/models/RootStore.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ export const RootStoreBase = withTypedRefs<Refs>()(MSTGQLStore
})
.actions(self => ({
queryPokemons(variables: { first: number }, resultSelector: string | ((qb: PokemonModelSelector) => PokemonModelSelector) = pokemonModelPrimitives.toString(), options: QueryOptions = {}) {
return self.query<{ pokemons: PokemonModelType[]}>(`query pokemons($first: Int!) { pokemons(first: $first) {
return self.query<{ pokemons: PokemonModelType[] }>(`query pokemons($first: Int!) { pokemons(first: $first) {
${typeof resultSelector === "function" ? resultSelector(new PokemonModelSelector()).toString() : resultSelector}
} }`, variables, options)
},
queryPokemon(variables: { id?: (string | null), name?: (string | null) }, resultSelector: string | ((qb: PokemonModelSelector) => PokemonModelSelector) = pokemonModelPrimitives.toString(), options: QueryOptions = {}) {
return self.query<{ pokemon: PokemonModelType}>(`query pokemon($id: String, $name: String) { pokemon(id: $id, name: $name) {
return self.query<{ pokemon: PokemonModelType }>(`query pokemon($id: String, $name: String) { pokemon(id: $id, name: $name) {
${typeof resultSelector === "function" ? resultSelector(new PokemonModelSelector()).toString() : resultSelector}
} }`, variables, options)
},
Expand Down
8 changes: 5 additions & 3 deletions examples/3-twitter-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
"cors": "^2.8.5",
"express": "^4.17.1",
"fakergem": "^1.0.3",
"graphql": "15.8.0",
"graphql-playground-middleware-express": "^1.7.21",
"isomorphic-fetch": "^2.2.1",
"mobx": "^6.6.0",
"mobx-react-lite": "^1.4.1",
"mobx-state-tree": "^5.1.5",
"mobx": "^6.10.2",
"mobx-react": "^7.5.0",
"mobx-react-lite": "^4.0.5",
"mobx-state-tree": "^5.3.0",
"mst-gql": "portal:../../",
"node-uuid": "^1.4.8",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/3-twitter-clone/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@

<body>
<div id="root"></div>
<script type="text/javascript" src="../src/app/index.tsx"></script>
<script type="module" src="../src/app/index.tsx"></script>
</body>
</html>
9 changes: 8 additions & 1 deletion examples/3-twitter-clone/src/app/components/Message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ import { MessageModelType } from "../models/"
import { Replies } from "./Replies"

// @ts-ignore
import images from "../avatars/*.jpg"
import chuck from "../avatars/chuck.jpg"
// @ts-ignore
import michel from "../avatars/michel.jpg"

const images = {
michel,
chuck
}

export const Message = observer(
({ message, asChild }: { message: MessageModelType; asChild?: boolean }) => {
Expand Down
6 changes: 3 additions & 3 deletions examples/3-twitter-clone/src/app/models/MessageModel.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export class MessageModelSelector extends QueryBuilder {
get id() { return this.__attr(`id`) }
get timestamp() { return this.__attr(`timestamp`) }
get text() { return this.__attr(`text`) }
user(builder?: string | UserModelSelector | ((selector: UserModelSelector) => UserModelSelector)) { return this.__child(`user`, UserModelSelector, builder) }
likes(builder?: string | UserModelSelector | ((selector: UserModelSelector) => UserModelSelector)) { return this.__child(`likes`, UserModelSelector, builder) }
replyTo(builder?: string | MessageModelSelector | ((selector: MessageModelSelector) => MessageModelSelector)) { return this.__child(`replyTo`, MessageModelSelector, builder) }
user(builder: string | UserModelSelector | ((selector: UserModelSelector) => UserModelSelector) | undefined) { return this.__child(`user`, UserModelSelector, builder) }
likes(builder: string | UserModelSelector | ((selector: UserModelSelector) => UserModelSelector) | undefined) { return this.__child(`likes`, UserModelSelector, builder) }
replyTo(builder: string | MessageModelSelector | ((selector: MessageModelSelector) => MessageModelSelector) | undefined) { return this.__child(`replyTo`, MessageModelSelector, builder) }
}
export function selectFromMessage() {
return new MessageModelSelector()
Expand Down
20 changes: 10 additions & 10 deletions examples/3-twitter-clone/src/app/models/RootStore.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,42 +47,42 @@ export const RootStoreBase = withTypedRefs<Refs>()(MSTGQLStore
})
.actions(self => ({
querySearch(variables: { searchText: string }, resultSelector: string | ((qb: SearchResultModelSelector) => SearchResultModelSelector) = searchResultModelPrimitives.toString(), options: QueryOptions = {}) {
return self.query<{ search: SearchResultUnion[]}>(`query search($searchText: String!) { search(searchText: $searchText) {
return self.query<{ search: SearchResultUnion[] }>(`query search($searchText: String!) { search(searchText: $searchText) {
${typeof resultSelector === "function" ? resultSelector(new SearchResultModelSelector()).toString() : resultSelector}
} }`, variables, options)
},
queryMessages(variables: { offset?: string, count?: number, replyTo?: string }, resultSelector: string | ((qb: MessageModelSelector) => MessageModelSelector) = messageModelPrimitives.toString(), options: QueryOptions = {}) {
return self.query<{ messages: MessageModelType[]}>(`query messages($offset: ID, $count: Int, $replyTo: ID) { messages(offset: $offset, count: $count, replyTo: $replyTo) {
queryMessages(variables: { offset?: (string | null), count?: (number | null), replyTo?: (string | null) }, resultSelector: string | ((qb: MessageModelSelector) => MessageModelSelector) = messageModelPrimitives.toString(), options: QueryOptions = {}) {
return self.query<{ messages: MessageModelType[] }>(`query messages($offset: ID, $count: Int, $replyTo: ID) { messages(offset: $offset, count: $count, replyTo: $replyTo) {
${typeof resultSelector === "function" ? resultSelector(new MessageModelSelector()).toString() : resultSelector}
} }`, variables, options)
},
queryMessage(variables: { id: string }, resultSelector: string | ((qb: MessageModelSelector) => MessageModelSelector) = messageModelPrimitives.toString(), options: QueryOptions = {}) {
return self.query<{ message: MessageModelType}>(`query message($id: ID!) { message(id: $id) {
return self.query<{ message: MessageModelType }>(`query message($id: ID!) { message(id: $id) {
${typeof resultSelector === "function" ? resultSelector(new MessageModelSelector()).toString() : resultSelector}
} }`, variables, options)
},
queryMe(variables?: { }, resultSelector: string | ((qb: UserModelSelector) => UserModelSelector) = userModelPrimitives.toString(), options: QueryOptions = {}) {
return self.query<{ me: UserModelType}>(`query me { me {
return self.query<{ me: UserModelType }>(`query me { me {
${typeof resultSelector === "function" ? resultSelector(new UserModelSelector()).toString() : resultSelector}
} }`, variables, options)
},
mutateChangeName(variables: { id: string, name: string }, resultSelector: string | ((qb: UserModelSelector) => UserModelSelector) = userModelPrimitives.toString(), optimisticUpdate?: () => void) {
return self.mutate<{ changeName: UserModelType}>(`mutation changeName($id: ID!, $name: String!) { changeName(id: $id, name: $name) {
return self.mutate<{ changeName: UserModelType }>(`mutation changeName($id: ID!, $name: String!) { changeName(id: $id, name: $name) {
${typeof resultSelector === "function" ? resultSelector(new UserModelSelector()).toString() : resultSelector}
} }`, variables, optimisticUpdate)
},
mutateLike(variables: { msg: string, user: string }, resultSelector: string | ((qb: MessageModelSelector) => MessageModelSelector) = messageModelPrimitives.toString(), optimisticUpdate?: () => void) {
return self.mutate<{ like: MessageModelType}>(`mutation like($msg: ID!, $user: ID!) { like(msg: $msg, user: $user) {
return self.mutate<{ like: MessageModelType }>(`mutation like($msg: ID!, $user: ID!) { like(msg: $msg, user: $user) {
${typeof resultSelector === "function" ? resultSelector(new MessageModelSelector()).toString() : resultSelector}
} }`, variables, optimisticUpdate)
},
mutatePostTweet(variables: { text: string, user: string, replyTo?: string }, resultSelector: string | ((qb: MessageModelSelector) => MessageModelSelector) = messageModelPrimitives.toString(), optimisticUpdate?: () => void) {
return self.mutate<{ postTweet: MessageModelType}>(`mutation postTweet($text: String!, $user: ID!, $replyTo: ID) { postTweet(text: $text, user: $user, replyTo: $replyTo) {
mutatePostTweet(variables: { text: string, user: string, replyTo?: (string | null) }, resultSelector: string | ((qb: MessageModelSelector) => MessageModelSelector) = messageModelPrimitives.toString(), optimisticUpdate?: () => void) {
return self.mutate<{ postTweet: MessageModelType }>(`mutation postTweet($text: String!, $user: ID!, $replyTo: ID) { postTweet(text: $text, user: $user, replyTo: $replyTo) {
${typeof resultSelector === "function" ? resultSelector(new MessageModelSelector()).toString() : resultSelector}
} }`, variables, optimisticUpdate)
},
subscribeNewMessages(variables?: { }, resultSelector: string | ((qb: MessageModelSelector) => MessageModelSelector) = messageModelPrimitives.toString(), onData?: (item: any) => void, onError?: (error: Error) => void) {
return self.subscribe<{ newMessages: MessageModelType}>(`subscription newMessages { newMessages {
return self.subscribe<{ newMessages: MessageModelType }>(`subscription newMessages { newMessages {
${typeof resultSelector === "function" ? resultSelector(new MessageModelSelector()).toString() : resultSelector}
} }`, variables, onData, onError)
},
Expand Down
2 changes: 1 addition & 1 deletion examples/3-twitter-clone/src/app/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/* eslint-disable */
/* tslint:disable */

export * from "./SearchResultModelSelector"
export * from "./UserModel"
export * from "./MessageModel"
export * from "./SearchResultModelSelector"
export * from "./RootStore"
export * from "./reactUtils"
6 changes: 3 additions & 3 deletions examples/3-twitter-clone/src/app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"rootDir": "./src/app",
"baseUrl": "./src/app",
"target": "es6",
"rootDir": "./",
// "baseUrl": "./src/app",
"strict": false,
"lib": ["dom", "es2018", "esnext.asynciterable", "esnext.array"],
"jsx": "react",
Expand Down
6 changes: 4 additions & 2 deletions examples/4-apollo-tutorial/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
"react-scripts": "^5.0.1"
},
"devDependencies": {
"graphql": "^16.8.1",
"graphql-request": "^6.1.0",
"jest-dom": "^3.0.0",
"mobx": "^6.6.0",
"mobx": "^6.10.2",
"mobx-react": "^7.5.0",
"mobx-state-tree": "^5.1.5",
"mobx-state-tree": "^5.3.0",
"react-testing-library": "^5.4.4",
"wait-port": "^0.2.9"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/4-apollo-tutorial/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"apollo-server": "^2.9.4",
"apollo-server-testing": "^2.9.4",
"dotenv": "^6.1.0",
"graphql": "^16.5.0",
"graphql": "15.8.0",
"isemail": "^3.1.3",
"nodemon": "^1.19.2",
"sequelize": "^5.15.1",
"sequelize": "^6.29.0",
"sqlite3": "^4.0.9"
},
"devDependencies": {
Expand Down
Binary file modified examples/4-apollo-tutorial/server/store.sqlite
Binary file not shown.
5 changes: 4 additions & 1 deletion examples/5-nextjs/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
/// <reference types="next" />
/// <reference types="next/types/global" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
10 changes: 4 additions & 6 deletions examples/5-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"apollo-server-express": "^2.18.0",
"cross-env": "^5.2.1",
"express": "^4.17.1",
"mobx": "^6.6.0",
"graphql": "15.8.0",
"mobx": "^6.10.2",
"mobx-react": "^7.5.0",
"mobx-state-tree": "^5.1.5",
"mobx-state-tree": "^5.3.0",
"mst-gql": "portal:../../",
"next": "^12.2.2"
"next": "^13.5.0"
},
"devDependencies": {
"@types/react": "^18.0.15",
Expand All @@ -23,8 +24,5 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.7.3"
},
"resolutions": {
"graphql": "^16.5.0"
}
}
3 changes: 2 additions & 1 deletion examples/5-nextjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true
"isolatedModules": true,
"incremental": true
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
Expand Down
5 changes: 3 additions & 2 deletions examples/6-scaffolding-ts-hasura/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"start": "yarn scaffold && yarn build"
},
"dependencies": {
"graphql": "^16.8.1",
"graphql-request": "^4.3.0",
"mobx": "^6.6.0",
"mobx-state-tree": "^5.1.5",
"mobx": "^6.10.2",
"mobx-state-tree": "^5.3.0",
"mst-gql": "portal:../../"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export class PollsModelSelector extends QueryBuilder {
get question() { return this.__attr(`question`) }
get updated_at() { return this.__attr(`updated_at`) }
get updated_by() { return this.__attr(`updated_by`) }
choices(builder: string | ChoicesModelSelector | ((selector: ChoicesModelSelector) => ChoicesModelSelector) | undefined, args?: { distinctOn?: ChoicesSelectColumn[], limit?: (number | null), offset?: (number | null), orderBy?: ChoicesOrderBy[], where?: (ChoicesBoolExp | null) }) { return this.__child(`choices`+ (args ? '('+['distinctOn', 'limit', 'offset', 'orderBy', 'where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), ChoicesModelSelector, builder) }
choices_aggregate(builder: string | ChoicesAggregateModelSelector | ((selector: ChoicesAggregateModelSelector) => ChoicesAggregateModelSelector) | undefined, args?: { distinctOn?: ChoicesSelectColumn[], limit?: (number | null), offset?: (number | null), orderBy?: ChoicesOrderBy[], where?: (ChoicesBoolExp | null) }) { return this.__child(`choices_aggregate`+ (args ? '('+['distinctOn', 'limit', 'offset', 'orderBy', 'where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), ChoicesAggregateModelSelector, builder) }
choices(builder: string | ChoicesModelSelector | ((selector: ChoicesModelSelector) => ChoicesModelSelector) | undefined, args?: { distinctOn?: ChoicesSelectColumn[] | null, limit?: (number | null), offset?: (number | null), orderBy?: ChoicesOrderBy[] | null, where?: (ChoicesBoolExp | null) }) { return this.__child(`choices`+ (args ? '('+['distinctOn', 'limit', 'offset', 'orderBy', 'where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), ChoicesModelSelector, builder) }
choices_aggregate(builder: string | ChoicesAggregateModelSelector | ((selector: ChoicesAggregateModelSelector) => ChoicesAggregateModelSelector) | undefined, args?: { distinctOn?: ChoicesSelectColumn[] | null, limit?: (number | null), offset?: (number | null), orderBy?: ChoicesOrderBy[] | null, where?: (ChoicesBoolExp | null) }) { return this.__child(`choices_aggregate`+ (args ? '('+['distinctOn', 'limit', 'offset', 'orderBy', 'where'].map((argName) => ((args as any)[argName] ? `${argName}: ${JSON.stringify((args as any)[argName])}` : null) ).filter((v) => v!=null).join(', ') + ')': ''), ChoicesAggregateModelSelector, builder) }
}
export function selectFromPolls() {
return new PollsModelSelector()
Expand Down
Loading
Loading