Patryk Wałach

Results 9 comments of Patryk Wałach

this is pretty easy to implement, mappedActions have to be bound with $store ```typescript const mappedActions = mapActions('user', ['login']) const store = useStore() const login = mappedActions.login.bind({ $store: store })...

I think the biggest issues with type safety are: 1. typescript not having optional type arguments It's impossible to just pass type of state ```tsx useState('user', ['name', 'id']) ``` The...

You can use `mapActions` to access namespacedDisptach ```tsx export default { mounted() { this.dispatchSomeAction() }, methods: mapActions('subModuleName', { dispatchSomeAction(dispatch) { dispatch('someAction') }, }), } ```

you can install a pre-release under a `next` tag ```sh npm i nexus@next ```

```ts t.nonNull.list.nonNull.field('posts', { type: 'Post', resolve: (parent, _, context) => { return parent.posts || context.prisma.user.findUnique({ where: { id: parent.id } }).posts() } }) ```

```ts t.nonNull.id('databaseId' { resolve: ({ id }) => id }); ```

I could implement this. The question is what API would be best. I have few ideas First approach would be a higher order function, loaders would pass `params` as `variables`...

The regexes above were really slow for me. And support only one pair of brackets. In this [stack overflow post](https://stackoverflow.com/questions/546433/regular-expression-to-match-balanced-parentheses#:~:text=%5C(%5B%5E)(%5D*(%3F%3A%5C(%5B%5E)(%5D*(%3F%3A%5C(%5B%5E)(%5D*(%3F%3A%5C(%5B%5E)(%5D*%5C)%5B%5E)(%5D*)*%5C)%5B%5E)(%5D*)*%5C)%5B%5E)(%5D*)*%5C)) I've found a really fast version which supports three pairs,...

It seems that `transformers` are not supported in v4, as a workaround I use `tvTransformer` as a simple vite plugin ```tsx // vite.config.ts import tailwindcss from '@tailwindcss/vite' import { defineConfig,...