Skip to content

Latest commit

 

History

History
 
 

1-getting-started

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

About

This is a basic todo app built with urql. It demonstrates some of the core principles of the framework, including:

  • Creating a client.
  • Wrapping your app with Provider.
  • Using the useQuery hook to execute and refetch queries.
  • Using the useMutation hook to execute mutations.
  • Showing the devtools

Usage

1. Install dependencies in repo root.

To get started with the example, make sure to install urql's dependencies in the root directory of your clone. We link to the urql source from the examples directory, so its dependencies need to be installed.

# In root directory
yarn

2. Navigate to this directory and install dependencies.

cd examples/1-getting-started
yarn

3. Start the example app and server (this is done in a single command).

yarn start

4. Open your browser

Navigate to example at http://localhost:3000/. You can use the urql devtools by opening your console and navigating to the urql tab.