DEV Community

Cover image for GraphQL and Urql by Example

GraphQL and Urql by Example

Akshay Kadam (A2K) on August 27, 2019

According to the docs, urql is a GraphQL client that exposes a set of React components and hooks. It's built to be highly customisable and versat...
Collapse
 
mikevocalz profile image
Mike Vocalz

Can you please post of screenshot of the demo?

Collapse
 
deadcoder0904 profile image
Akshay Kadam (A2K)

Hey Mike, there's actually nothing but <input>'s & <button>'s. Not really visually appealing so I went without screenshots otherwise I always put screenshots in every one of my posts.

You can actually find the whole code here → github.com/deadcoder0904/graphql-a...

Clone it & install the dependencies & run the project to see it yourself.

I've also added instructions on how to start the server-side in the server/ folder :)

Collapse
 
stephyswe profile image
Stephanie

this is the kind of post that should have hundred thousands of likes. such a great example of using urql. 👏 👌 👍

Collapse
 
fedelopez89 profile image
Federico G. Lopez

What if I have multiple clients? How do I specify which client to use in the useQuery hook since we don't have a 'client' attr as we have in Apollo/client library?