Skip to content

Commit

Permalink
(docs) - Update all slogan texts across several documents (#1177)
Browse files Browse the repository at this point in the history
* Update website hero text

* Replace "Quick Start" with "Overview" as it's React-specific

This isn't quite equitable for non-React users and I have high trust
in the quality of our "Basics" pages. Hence "Overview" may only need
a few more pointers.

* Update first tagline in "Overview"

* Remove React-specific components section from urql page
  • Loading branch information
kitten authored Nov 19, 2020
1 parent ae25462 commit 446e01d
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 159 deletions.
101 changes: 59 additions & 42 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,75 @@
---
title: Quick start
order: 0
title: Overview
order: 1
---

# Quick start
# Overview

`urql` is a blazingly fast, lightweight, and customisable GraphQL client. We believe in usability and adaptability, `urql` is built with extensibility at its
core, allowing you to include just the key logic for a basic app, in addition to being able to grow to support dynamic single-app applications and highly
customised infrastructure.
`urql` is a highly customizable and versatile GraphQL client with which you add on features like
normalized caching as you grow. It's built to be both easy to use for newcomers to
GraphQL, as well as extensible, to grow to support dynamic single-app applications and highly
customized GraphQL infrastructure. In short, `urql` prioritizes usability and adaptability.

In this page we'll take a look at the quickest route to get up and running with `urql`.
As you're adopting GraphQL, `urql` becomes your primary data layer and can handle content-heavy
pages through ["Document Caching"](./basics/document-caching.md) as well as dynamic and data-heavy
apps through ["Normalized Caching"](./graphcache/normalized-caching.md).

## Installation
## Constituent Parts

`urql` can be understood as a collection of connected parts and packages. When [getting started](./basics/getting-started.md) we only need to install a single package for our
framework of choice. We're then able to declaratively send GraphQL requests to our API.

All framework packages — like `urql` (for React), `@urql/preact`, `@urql/svelte`, and `@urql/vue`
wrap the [core package, `@urql/core`](./concepts/core-package.md), which we can imagine as the brain
of `urql` with most of its logic.

As we progress with implementing `urql` into our application, we're later able to extend it by
adding ["addon packages", which we call _Exchanges_](./concepts/exchanges.md)

## Quick Start

We have **Getting Started** guides for
[React &
Preact](https://formidable.com/open-source/urql/docs/basics/getting-started/#react--preact),
[Svelte](https://formidable.com/open-source/urql/docs/basics/getting-started/#svelte), and
[Vue](https://formidable.com/open-source/urql/docs/basics/getting-started/#vue) which walk through
how to install the bindings for your framework of choice and set up the
[`Client`](./api/core.md#client).

Generally for React this would look like this, where the `urql` package may be replaced with your
framework's bindings:

```sh
# npm
npm i --save urql graphql
# or yarn
# or
yarn add urql graphql
```

## Making the client
The **Basics** section also features pages to [write
Queries](https://formidable.com/open-source/urql/docs/basics/queries/),
[Mutations](https://formidable.com/open-source/urql/docs/basics/mutations/), after which we could
continue learning about
[Subscriptions](https://formidable.com/open-source/urql/docs/advanced/subscriptions/). These are
among the only pages that are framework-specific.

```jsx
import { createClient, Provider } from 'urql';
## The Documentation

const client = createClient({ url: 'https://0ufyz.sse.codesandbox.io' });
This documentation is split into groups or sections that cover different levels of usage or areas of
interest.

const App = () => (
<Provider value={client}>
<Todos />
</Provider>
);
```
- **Basics** is the section where we find the ["Getting Started"
guide](./basics/getting-started.md) and usage patterns for our framework of choice.
- **Main Concepts** then explains more about how `urql` functions, what it's made up of, and covers
the main aspects of the `Client` and GraphQL clients in general, on the ["Philosophy"
page](./concepts/philosophy.md).
- **Advanced** covers all more uncommon use-cases and contains guides that we won't need immediately
when we get started with `urql`.
- **Graphcache** documents one of the most important addons to `urql`, which adds ["Normalized
Caching" support](./graphcache/normalized-caching.md) to the `Client` and enables more complex
use-cases, smarter caching, and more dynamic apps to function.
- **Showcase** aims to list users of `urql`, third-party packages, and other helpful resources,
like tutorials and guides.
- **API** contains a detailed list of all helpers, utilities, components, and other parts of each of
`urql`'s packages, which may contain all details of each part and package.

## Querying data

```jsx
const Todos = () => {
const [res, executeQuery] = useQuery({
query: `
query { todos { id text } }
`,
});

if (res.fetching) return <p>Loading...</p>;
if (res.error) return <p>Errored!</p>;

return (
<ul>
{res.data.todos.map(todo => (
<li key={todo.id}>{todo.text}</li>
))}
</ul>
);
};
```
We hope you grow to love `urql`!
48 changes: 0 additions & 48 deletions docs/overview.md

This file was deleted.

6 changes: 0 additions & 6 deletions packages/site/src/screens/home/_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ const content = {
icon: require('../../assets/clock-tile.svg'),
},
],
components: {
title: 'Minimal React Components and Hooks',
description:
"Whether you prefer a <Query> component or useQuery Hook, urql's API is intuitive to use, with full support for GraphQL Queries, Mutations and Subscriptions in both styles!",
icon: require('../../assets/react-tile.svg'),
},
preview: {
description: '',
media: '',
Expand Down
59 changes: 0 additions & 59 deletions packages/site/src/screens/home/components.js

This file was deleted.

5 changes: 3 additions & 2 deletions packages/site/src/screens/home/hero.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ const Hero = props => {
</HeroLogoContainer>
<HeroTitle>urql</HeroTitle>
<HeroBody>
urql is a blazing-fast GraphQL client that supports React, Preact, and
Svelte (alpha).
The highly customizable and versatile GraphQL client for React,
Svelte, Vue, or plain JavaScript, with which you add on features like
normalized caching as you grow.
</HeroBody>
<HeroButtonsWrapper>
<HeroNPMWrapper>
Expand Down
2 changes: 0 additions & 2 deletions packages/site/src/screens/home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { usePrefetch } from 'react-static';
import { useMarkdownTree } from 'react-static-plugin-md-pages';

import Features from './features';
import Components from './components';
import GetStarted from './get-started';
import MoreOSS from './more-oss';
import content from './_content';
Expand All @@ -23,7 +22,6 @@ const Home = () => {
<Container ref={ref}>
<Header content={content.header} />
<Features featureArray={content.features} />
<Components components={content.components} />
<GetStarted content={content.getStarted} />
<MoreOSS oss={content.oss} />
<Footer />
Expand Down

0 comments on commit 446e01d

Please sign in to comment.