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
feat: jotai/urql #463
feat: jotai/urql #463
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/pmndrs/jotai/6fQELC62q11qdCEbZHBNMeimVk96 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 856879b:
|
@kitten I think I'm done with |
I think it's better to pass const client = createClient(...)
const anAtom = atomWithQuery(client, () => ({ query: ... })) |
https://codesandbox.io/s/react-typescript-forked-pqpof?file=/src/App.tsx Hmm, having client static isn't very nice. Put it in the args??? |
https://codesandbox.io/s/react-typescript-forked-yqboc?file=/src/App.tsx |
Hmm, I wonder how to create examples for mutation and subscription. Are there any dummy servers? Well, the initial release can be |
@dai-shi Yes! we've got multiple example schemas up at trygql.formidable.dev; The examples folder in the urql repo shows us using some of them |
Okay, I will release this. I'm still not confident if this is stable and will note "may contain bugs, api may change". But, unless we release it we wouldn't get enough feedback. |
close #427
title: URQL
description: This doc describes
jotai/urql
bundle.Install
You have to install
@urql/core
andwonka
to access this bundle and its functions.atomWithQuery
atomWithQuery
creates a new atom with a query. It internally uses client.query.Examples
Basic demo
https://codesandbox.io/s/react-typescript-forked-zujf6?file=/src/App.tsx
<Codesandbox id="zujf6" />
atomWithMutation
atomWithMutation
creates a new atom with a mutation. It internally uses client.mutation.Examples
TODO
atomWithSubscription
atomWithSubscription
creates a new atom with a mutation. It internally uses client.subscription.Examples
TODO