diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index ba73b7d5..35515817 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,6 +1,6 @@ -/.github/ @ryan-roemer @boygirl -/.changeset/config.json @ryan-roemer @boygirl -/scripts/actions/* @ryan-roemer @boygirl -/scripts/prepare/* @ryan-roemer @boygirl -/scripts/rollup/* @ryan-roemer @boygirl -/scripts/changesets/* @ryan-roemer @boygirl +/.github/ @urql-graphql/core +/.changeset/config.json @urql-graphql/core +/scripts/actions/* @urql-graphql/core +/scripts/prepare/* @urql-graphql/core +/scripts/rollup/* @urql-graphql/core +/scripts/changesets/* @urql-graphql/core diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 7ea43983..5c26aad3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -40,9 +40,9 @@ body: label: Validations description: Before submitting the issue, please make sure you do the following options: - - label: I can confirm that this is a bug report, and not a feature request, RFC, question, or discussion, for which [GitHub Discussions](https://github.com/FormidableLabs/urql/discussions) should be used + - label: I can confirm that this is a bug report, and not a feature request, RFC, question, or discussion, for which [GitHub Discussions](https://github.com/urql-graphql/urql/discussions) should be used required: true - label: Read the [docs](https://formidable.com/open-source/urql/docs/). required: true - - label: Follow our [Code of Conduct](https://github.com/FormidableLabs/urql/blob/main/CODE_OF_CONDUCT.md) + - label: Follow our [Code of Conduct](https://github.com/urql-graphql/urql/blob/main/CODE_OF_CONDUCT.md) required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 9b4e925c..c8ba22df 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,6 +1,6 @@ blank_issues_enabled: true contact_links: - name: Ask a question - url: https://github.com/FormidableLabs/urql/discussions + url: https://github.com/urql-graphql/urql/discussions about: Ask questions and discuss with other community members diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index b00aa094..5b6bf9f9 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -57,9 +57,9 @@ further defined and clarified by project maintainers. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team: -- lauren.eastridge@formidable.com -- phil.pluckthun@formidable.com -- Twitter DMs: @_philpl +- phil@0no.co +- grant.sander@formidable.com +- jovi@preact.dev All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1bbca35..151904d0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,10 +17,10 @@ If you have an idea for a feature or want to fix a bug, consider opening an issu first. We're also happy to discuss and help you open a PR and get your changes in! -- If you have a question, try [creating a GitHub Discussions thread.](https://github.com/FormidableLabs/urql/discussions/new) -- If you think you've found a bug, [open a new issue.](https://github.com/FormidableLabs/urql/issues/new/choose) -- or, if you found a bug you'd like to fix, [open a PR.](https://github.com/FormidableLabs/urql/compare) -- If you'd like to propose a change [open an RFC issue.](https://github.com/FormidableLabs/urql/issues/new?labels=future+%F0%9F%94%AE&template=RFC.md&title=RFC%3A+Your+Proposal) You can read more about the RFC process [below](#how-do-i-propose-changes). +- If you have a question, try [creating a GitHub Discussions thread.](https://github.com/urql-graphql/urql/discussions/new) +- If you think you've found a bug, [open a new issue.](https://github.com/urql-graphql/urql/issues/new/choose) +- or, if you found a bug you'd like to fix, [open a PR.](https://github.com/urql-graphql/urql/compare) +- If you'd like to propose a change [open an RFC issue.](https://github.com/urql-graphql/urql/issues/new?labels=future+%F0%9F%94%AE&template=RFC.md&title=RFC%3A+Your+Proposal) You can read more about the RFC process [below](#how-do-i-propose-changes). ### What are the issue conventions? @@ -35,9 +35,9 @@ or an undocumented quirk. We follow an **RFC proposal process**. This allows anyone to propose a new feature or a change, and allows us to communicate our current planned features or changes, so any technical discussion, progress, or upcoming changes are always **documented transparently.** You can [find the RFC -template](https://github.com/FormidableLabs/urql/issues/new/choose) in our issue creator. +template](https://github.com/urql-graphql/urql/issues/new/choose) in our issue creator. -All RFCs are added to the [RFC Lifecycle board.](https://github.com/FormidableLabs/urql/projects/3) +All RFCs are added to the [RFC Lifecycle board.](https://github.com/urql-graphql/urql/projects/3) This board tracks where an RFC stands and who's working on it until it's completed. Bugs and PRs may end up on there too if no corresponding RFC exists or was necessary. RFCs are typically first added to "In Discussion" until we believe they're ready to be worked on. This step may either be short, @@ -248,5 +248,4 @@ Typically what we do is: ```sh npm access grant read-write urql:developers [package] -npm access grant read-write formidable:formidable [package] ``` diff --git a/LICENSE b/LICENSE index 73353355..14ac9897 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ MIT License -Copyright (c) 2018–2020 Formidable +Copyright (c) 2018–2020 Formidable, +Copyright (c) urql GraphQL Team and other contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index ee3eda9f..bc7a6952 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,8 @@

- - CI Status - - - Maintenance Status + + CI Status Weekly downloads @@ -22,7 +19,7 @@ Visit docs - + GitHub Discussions: Chat With Us
@@ -37,9 +34,10 @@ - 🌱 Normalized caching via [`@urql/exchange-graphcache`](https://formidable.com/open-source/urql/docs/graphcache) - 🔬 Easy debugging with the [`urql` devtools browser extensions](https://formidable.com/open-source/urql/docs/advanced/debugging/) -`urql` is a GraphQL client that exposes a set of helpers for several frameworks. It's built to be highly customisable and versatile so you can take it from getting started with your first GraphQL project all the way to building complex apps and experimenting with GraphQL clients. +`urql` is a GraphQL client that exposes a set of helpers for several frameworks. It's built to be highly customisable and versatile so +you can take it from getting started with your first GraphQL project all the way to building complex apps and experimenting with GraphQL clients. -While GraphQL is an elegant protocol and schema language, client libraries today typically come with large API footprints. We aim to create something more lightweight instead. +**📃 For more information, [check out the docs](https://formidable.com/open-source/urql/docs/).** ## Installation @@ -49,6 +47,13 @@ yarn add urql graphql npm install --save urql graphql ``` +## 🙌 Contributing + +**The urql project was founded by [Formidable](https://formidable.com/) and is actively developed +by the urql GraphQL team.** + +If you'd like to get involved, [check out our Contributor's guide.](https://github.com/urql-graphql/urql/blob/main/CONTRIBUTING.md) + ## 📃 [Documentation](https://formidable.com/open-source/urql/docs/) The documentation contains everything you need to know about `urql`, and contains several sections in order of importance @@ -62,8 +67,4 @@ when you first get started: _You can find the raw markdown files inside this repository's `docs` folder._ -## Maintenance Status - -**Active:** Formidable is actively working on this project, and we expect to continue work on this project for the foreseeable future. Bug reports, feature requests and pull requests are welcome. - diff --git a/docs/advanced/README.md b/docs/advanced/README.md index 399fc135..4c4b1fd9 100644 --- a/docs/advanced/README.md +++ b/docs/advanced/README.md @@ -15,7 +15,7 @@ chapter.](../architecture.md) Persisted Queries and File Uploads using the two respective packages. - [**Server-side Rendering**](./server-side-rendering.md) guides us through how to set up server-side rendering and rehydration. - [**Debugging**](./debugging.md) shows us the [`urql` - devtools](https://github.com/FormidableLabs/urql-devtools/) and how to add our own debug events + devtools](https://github.com/urql-graphql/urql-devtools/) and how to add our own debug events for its event view. - [**Retrying operations**](./retry-operations.md) shows the `retryExchange` which allows you to retry operations when they've failed. - [**Authentication**](./authentication.md) describes how to implement authentication using the `authExchange` diff --git a/docs/advanced/debugging.md b/docs/advanced/debugging.md index 98a0f83a..cd1abbdf 100644 --- a/docs/advanced/debugging.md +++ b/docs/advanced/debugging.md @@ -10,13 +10,13 @@ and those creating their own exchanges. ## Devtools -It's easiest to debug `urql` with the [`urql` devtools.](https://github.com/FormidableLabs/urql-devtools/) +It's easiest to debug `urql` with the [`urql` devtools.](https://github.com/urql-graphql/urql-devtools/) It offers tools to inspect internal ["Debug Events"](#debug-events) as they happen, to explore data as your app is seeing it, and to quickly trigger GraphQL queries. [For instructions on how to set up the devtools, check out `@urql/devtools`'s readme in its -repository.](https://github.com/FormidableLabs/urql-devtools) +repository.](https://github.com/urql-graphql/urql-devtools) ![Urql Devtools Timeline](../assets/devtools-timeline.png) diff --git a/docs/api/auth-exchange.md b/docs/api/auth-exchange.md index d335db5e..24b0cfa4 100644 --- a/docs/api/auth-exchange.md +++ b/docs/api/auth-exchange.md @@ -101,4 +101,4 @@ function addAuthToOperation: ({ } ``` -[Read more examples in the documentation given here.](https://github.com/FormidableLabs/urql/tree/main/exchanges/auth#quick-start-guide) +[Read more examples in the documentation given here.](https://github.com/urql-graphql/urql/tree/main/exchanges/auth#quick-start-guide) diff --git a/docs/architecture.md b/docs/architecture.md index ae1e1103..a974a251 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -150,7 +150,7 @@ Some of the exchanges that are available to us are: - [`requestPolicyExchange`](./api/request-policy-exchange.md): Automatically upgrades `cache-only` and `cache-first` operations to `cache-and-network` after a given amount of time. - [`refocusExchange`](./api/refocus-exchange.md): Tracks open queries and refetches them when the window regains focus. -- `devtoolsExchange`: Provides the ability to use the [urql-devtools](https://github.com/FormidableLabs/urql-devtools) +- `devtoolsExchange`: Provides the ability to use the [urql-devtools](https://github.com/urql-graphql/urql-devtools) We can even swap out our [document cache](./basics/document-caching.md), which is implemented by `@urql/core`'s `cacheExchange`, with `urql`'s [normalized cache, diff --git a/docs/basics/ui-patterns.md b/docs/basics/ui-patterns.md index 3f730735..09f3eaa4 100644 --- a/docs/basics/ui-patterns.md +++ b/docs/basics/ui-patterns.md @@ -5,7 +5,7 @@ order: 6 # UI Patterns -> This page is incomplete. You can help us expanding it by suggesting more patterns or asking us about common problems you're facing on [GitHub Discussions](https://github.com/FormidableLabs/urql/discussions). +> This page is incomplete. You can help us expanding it by suggesting more patterns or asking us about common problems you're facing on [GitHub Discussions](https://github.com/urql-graphql/urql/discussions). Generally, `urql`'s API surface is small and compact. Some common problems that we're facing when building apps may look like they're not a built-in feature, however, there are several patterns that even a lean UI can support. This page is a collection of common UI patterns and problems we may face with GraphQL and how we can tackle them in @@ -87,9 +87,9 @@ const Search = () => { Here we keep an array of all `variables` we've encountered and use them to render their respective `result` page. This only rerenders the additional page rather than having a long -list that constantly changes. [You can find a full code example of this pattern in our example folder on the topic of Graphcache pagination.](https://github.com/FormidableLabs/urql/tree/main/examples/with-graphcache-pagination) +list that constantly changes. [You can find a full code example of this pattern in our example folder on the topic of Graphcache pagination.](https://github.com/urql-graphql/urql/tree/main/examples/with-graphcache-pagination) -We also do not need to use our normalized cache to achieve this. As long as we're able to split individual lists up into chunks across components, we can also solve this problem entirely in UI code. [Read our example code on how to achieve this.](https://github.com/FormidableLabs/urql/tree/main/examples/with-pagination) +We also do not need to use our normalized cache to achieve this. As long as we're able to split individual lists up into chunks across components, we can also solve this problem entirely in UI code. [Read our example code on how to achieve this.](https://github.com/urql-graphql/urql/tree/main/examples/with-pagination) ## Prefetching data @@ -161,8 +161,8 @@ We can unpause the hook to start fetching, or, like in this example, call its re In urql we leverage our extensibility pattern named "Exchanges" to manipulate the way data comes in and goes out of our client. -- [Stale time](https://github.com/FormidableLabs/urql/tree/main/exchanges/request-policy) -- [Focus](https://github.com/FormidableLabs/urql/tree/main/exchanges/refocus) +- [Stale time](https://github.com/urql-graphql/urql/tree/main/exchanges/request-policy) +- [Focus](https://github.com/urql-graphql/urql/tree/main/exchanges/refocus) When we want to introduce one of these patterns we add the package and add it to the `exchanges` property of our `Client`. In the case of these two we'll have to add it before the cache diff --git a/docs/comparison.md b/docs/comparison.md index 60081c58..9156da04 100644 --- a/docs/comparison.md +++ b/docs/comparison.md @@ -35,28 +35,28 @@ All features are marked to indicate the following: ### Core Features -| | urql | Apollo | Relay | -| ------------------------------------------ | ----------------------------------- | --------------------------------------------- | ------------------------------ | -| Extensible on a network level | ✅ Exchanges | ✅ Links | ✅ Network Layers | -| Extensible on a cache / control flow level | ✅ Exchanges | 🛑 | 🛑 | -| Base Bundle Size | **5.9kB** (7.1kB with bindings) | 32.9kB | 27.7kB (34.1kB with bindings) | -| Devtools | ✅ | ✅ | ✅ | -| Subscriptions | ✅ | ✅ | ✅ | -| Client-side Rehydration | ✅ | ✅ | ✅ | -| Polled Queries | 🔶 | ✅ | ✅ | -| Lazy Queries | ✅ | ✅ | ✅ | -| Stale while Revalidate / Cache and Network | ✅ | ✅ | ✅ | -| Focus Refetching | ✅ `@urql/exchange-refocus` | 🛑 | 🛑 | -| Stale Time Configuration | ✅ `@urql/exchange-request-policy` | ✅ | 🛑 | -| Persisted Queries | ✅ `@urql/exchange-persisted-fetch` | ✅ `apollo-link-persisted-queries` | ✅ | -| Batched Queries | 🛑 | ✅ `apollo-link-batch-http` | 🟡 `react-relay-network-layer` | -| Live Queries | 🛑 | 🛑 | ✅ | -| Defer & Stream Directives | ✅ | ✅ / 🛑 (`@defer` is supported in >=3.7.0, `@stream` is not yet supported) | 🟡 (unreleased) | -| Switching to `GET` method | ✅ | ✅ | 🟡 `react-relay-network-layer` | -| File Uploads | ✅ `@urql/exchange-multipart-fetch` | 🟡 `apollo-upload-client` | 🛑 | -| Retrying Failed Queries | ✅ `@urql/exchange-retry` | ✅ `apollo-link-retry` | ✅ `DefaultNetworkLayer` | -| Easy Authentication Flows | ✅ `@urql/exchange-auth` | 🛑 (no docs for refresh-based authentication) | 🟡 `react-relay-network-layer` | -| Automatic Refetch after Mutation | ✅ (with document cache) | 🛑 | ✅ | +| | urql | Apollo | Relay | +| ------------------------------------------ | ----------------------------------- | -------------------------------------------------------------------------- | ------------------------------ | +| Extensible on a network level | ✅ Exchanges | ✅ Links | ✅ Network Layers | +| Extensible on a cache / control flow level | ✅ Exchanges | 🛑 | 🛑 | +| Base Bundle Size | **5.9kB** (7.1kB with bindings) | 32.9kB | 27.7kB (34.1kB with bindings) | +| Devtools | ✅ | ✅ | ✅ | +| Subscriptions | ✅ | ✅ | ✅ | +| Client-side Rehydration | ✅ | ✅ | ✅ | +| Polled Queries | 🔶 | ✅ | ✅ | +| Lazy Queries | ✅ | ✅ | ✅ | +| Stale while Revalidate / Cache and Network | ✅ | ✅ | ✅ | +| Focus Refetching | ✅ `@urql/exchange-refocus` | 🛑 | 🛑 | +| Stale Time Configuration | ✅ `@urql/exchange-request-policy` | ✅ | 🛑 | +| Persisted Queries | ✅ `@urql/exchange-persisted-fetch` | ✅ `apollo-link-persisted-queries` | ✅ | +| Batched Queries | 🛑 | ✅ `apollo-link-batch-http` | 🟡 `react-relay-network-layer` | +| Live Queries | 🛑 | 🛑 | ✅ | +| Defer & Stream Directives | ✅ | ✅ / 🛑 (`@defer` is supported in >=3.7.0, `@stream` is not yet supported) | 🟡 (unreleased) | +| Switching to `GET` method | ✅ | ✅ | 🟡 `react-relay-network-layer` | +| File Uploads | ✅ `@urql/exchange-multipart-fetch` | 🟡 `apollo-upload-client` | 🛑 | +| Retrying Failed Queries | ✅ `@urql/exchange-retry` | ✅ `apollo-link-retry` | ✅ `DefaultNetworkLayer` | +| Easy Authentication Flows | ✅ `@urql/exchange-auth` | 🛑 (no docs for refresh-based authentication) | 🟡 `react-relay-network-layer` | +| Automatic Refetch after Mutation | ✅ (with document cache) | 🛑 | ✅ | Typically these are all additional addon features that you may expect from a GraphQL client, no matter which framework you use it with. It's worth mentioning that all three clients support some @@ -73,7 +73,7 @@ you'd have to lean on community libraries or maintaining/implementing them yours One thing of note is our lack of support for batched queries in `urql`. We explicitly decided not to support this in our [first-party -packages](https://github.com/FormidableLabs/urql/issues/800#issuecomment-626342821) as the benefits +packages](https://github.com/urql-graphql/urql/issues/800#issuecomment-626342821) as the benefits are not present anymore in most cases with HTTP/2 and established patterns by Relay that recommend hoisting all necessary data requirements to a page-wide query. @@ -92,17 +92,6 @@ hoisting all necessary data requirements to a page-wide query. | Angular Bindings | 🛑 | 🟡 `apollo-angular` | 🟡 `relay-angular` | | Initial Data on mount | ✅ | ✅ | ✅ | -Interestingly all three libraries heavily support React as they were all started from the React -community outwards, but Apollo and Vue benefit from community bindings for different frameworks a -lot. `urql`'s community is still growing and while that means it won't see large projects as -Apollo's `vue-apollo` in the short term, we're aiming for first-party support for these bindings. - -This is a common criticism that we hear about `urql`, and it's true that our community isn't as -extensive, but we attempt to lean on good and well funded maintenance at Formidable, active -investment, and good documentation. So you may have to evaluate whether you can get any questions -answered quickly enough on [GitHub Discussions](https://github.com/FormidableLabs/urql/discussions) -for instance. - ### Caching and State | | urql | Apollo | Relay | diff --git a/docs/graphcache/errors.md b/docs/graphcache/errors.md index 0004c855..25c7d16e 100644 --- a/docs/graphcache/errors.md +++ b/docs/graphcache/errors.md @@ -370,7 +370,7 @@ When your schema treats `Mutation` or `Subscription` like regular entity types y warning. This may happen because you've used the default reserved names `Mutation` or `Subscription` for entities rather than as special Operation Root Types, and haven't specified this in the schema. Hence this issue can often be fixed by either enabling -[Schema Awareness](https://formidable.com/open-source/urql/docs/graphcache/schema-awareness/) or by +[Schema Awareness](./schema-awareness.md) or by adding a `schema` definition to your GraphQL Schema like so: ```graphql diff --git a/docs/graphcache/offline.md b/docs/graphcache/offline.md index fca3e0b1..9c4f1707 100644 --- a/docs/graphcache/offline.md +++ b/docs/graphcache/offline.md @@ -91,7 +91,8 @@ const client = createClient({ For React Native, we can use the async storage package `@urql/storage-rn`. -Before installing the [library](https://github.com/FormidableLabs/urql/tree/main/packages/storage-rn), ensure you have installed the necessary peer dependencies: +Before installing the [library](https://github.com/urql-graphql/urql/tree/main/packages/storage-rn), ensure you have installed the necessary peer dependencies: + - NetInfo ([RN](https://github.com/react-native-netinfo/react-native-netinfo) | [Expo](https://docs.expo.dev/versions/latest/sdk/netinfo/)) and - AsyncStorage ([RN](https://react-native-async-storage.github.io/async-storage/docs/install) | [Expo](https://docs.expo.dev/versions/v42.0.0/sdk/async-storage/)). @@ -103,14 +104,13 @@ npm install --save @urql/storage-rn You can then create the custom storage and use it in the offline exchange: - ```js import { makeAsyncStorage } from '@urql/storage-rn'; const storage = makeAsyncStorage({ dataKey: 'graphcache-data', // The AsyncStorage key used for the data (defaults to graphcache-data) metadataKey: 'graphcache-metadata', // The AsyncStorage key used for the metadata (defaults to graphcache-metadata) - maxAge: 7 // How long to persist the data in storage (defaults to 7 days) + maxAge: 7, // How long to persist the data in storage (defaults to 7 days) }); ``` diff --git a/exchanges/auth/README.md b/exchanges/auth/README.md index 1d9779d2..e9e0750e 100644 --- a/exchanges/auth/README.md +++ b/exchanges/auth/README.md @@ -2,7 +2,7 @@

An exchange for managing authentication in urql

-`@urql/exchange-auth` is an exchange for the [`urql`](https://github.com/FormidableLabs/urql) GraphQL client which helps handle auth headers and token refresh +`@urql/exchange-auth` is an exchange for the [`urql`](https://github.com/urql-graphql/urql) GraphQL client which helps handle auth headers and token refresh ## Quick Start Guide @@ -27,10 +27,7 @@ const client = createClient({ dedupExchange, cacheExchange, authExchange({ - addAuthToOperation: ({ - authState, - operation, - }) => { + addAuthToOperation: ({ authState, operation }) => { // the token isn't in the auth state, return the operation without changes if (!authState || !authState.token) { return operation; @@ -42,20 +39,16 @@ const client = createClient({ ? operation.context.fetchOptions() : operation.context.fetchOptions || {}; - return makeOperation( - operation.kind, - operation, - { - ...operation.context, - fetchOptions: { - ...fetchOptions, - headers: { - ...fetchOptions.headers, - "Authorization": authState.token, - }, + return makeOperation(operation.kind, operation, { + ...operation.context, + fetchOptions: { + ...fetchOptions, + headers: { + ...fetchOptions.headers, + Authorization: authState.token, }, }, - ); + }); }, willAuthError: ({ authState }) => { if (!authState) return true; @@ -64,9 +57,7 @@ const client = createClient({ }, didAuthError: ({ error }) => { // check if the error was an auth error (this can be implemented in various ways, e.g. 401 or a special error code) - return error.graphQLErrors.some( - e => e.extensions?.code === 'FORBIDDEN', - ); + return error.graphQLErrors.some(e => e.extensions?.code === 'FORBIDDEN'); }, getAuth: async ({ authState, mutate }) => { // for initial launch, fetch the auth state from storage (local storage, async storage etc) @@ -112,7 +103,7 @@ const client = createClient({ return null; }, }), - fetchExchange + fetchExchange, ], }); ``` diff --git a/exchanges/auth/package.json b/exchanges/auth/package.json index b4ed9b79..ca6b5b2a 100644 --- a/exchanges/auth/package.json +++ b/exchanges/auth/package.json @@ -4,11 +4,11 @@ "description": "An exchange for managing authentication and token refresh in urql", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "exchanges/auth" }, "keywords": [ @@ -16,7 +16,7 @@ "exchange", "auth", "authentication", - "formidablelabs", + "graphql", "exchanges" ], "main": "dist/urql-exchange-auth", diff --git a/exchanges/context/README.md b/exchanges/context/README.md index ba8a23aa..3af1946b 100644 --- a/exchanges/context/README.md +++ b/exchanges/context/README.md @@ -2,7 +2,7 @@

An exchange for setting operation context in urql

-`@urql/exchange-context` is an exchange for the [`urql`](https://github.com/FormidableLabs/urql) GraphQL client which can set the operation context both synchronously as well as asynchronously +`@urql/exchange-context` is an exchange for the [`urql`](https://github.com/urql-graphql/urql) GraphQL client which can set the operation context both synchronously as well as asynchronously ## Quick Start Guide @@ -26,9 +26,9 @@ const client = createClient({ dedupExchange, cacheExchange, contextExchange({ - getContext: async (operation) => { + getContext: async operation => { const token = await getToken(); - return { ...operation.context, headers: { authorization: token } } + return { ...operation.context, headers: { authorization: token } }; }, }), fetchExchange, diff --git a/exchanges/context/package.json b/exchanges/context/package.json index 31d279a4..9daccf72 100644 --- a/exchanges/context/package.json +++ b/exchanges/context/package.json @@ -4,18 +4,18 @@ "description": "An exchange for setting (a)synchronous operation-context in urql", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "exchanges/context" }, "keywords": [ "urql", "exchange", "context", - "formidablelabs", + "graphql", "exchanges" ], "main": "dist/urql-exchange-context", diff --git a/exchanges/execute/README.md b/exchanges/execute/README.md index a37c64c2..ba068f8c 100644 --- a/exchanges/execute/README.md +++ b/exchanges/execute/README.md @@ -2,7 +2,7 @@

An exchange for executing queries against a local schema in urql

-`@urql/exchange-execute` is an exchange for the [`urql`](https://github.com/FormidableLabs/urql) GraphQL client which executes queries against a local schema. +`@urql/exchange-execute` is an exchange for the [`urql`](https://github.com/urql-graphql/urql) GraphQL client which executes queries against a local schema. This is a replacement for the default _fetchExchange_ which sends queries over HTTP/S to be executed remotely. ## Quick Start Guide diff --git a/exchanges/execute/package.json b/exchanges/execute/package.json index 98c37fff..58a548cb 100644 --- a/exchanges/execute/package.json +++ b/exchanges/execute/package.json @@ -4,11 +4,11 @@ "description": "An exchange for executing queries against a local schema in urql", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "exchanges/execute" }, "keywords": [ @@ -16,7 +16,7 @@ "exchange", "execute", "executable schema", - "formidablelabs", + "graphql", "exchanges" ], "main": "dist/urql-exchange-execute", diff --git a/exchanges/multipart-fetch/package.json b/exchanges/multipart-fetch/package.json index 7e30ac00..1055f9e9 100644 --- a/exchanges/multipart-fetch/package.json +++ b/exchanges/multipart-fetch/package.json @@ -4,16 +4,16 @@ "description": "An exchange that allows regular fetch and will transition to multipart when files are included", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "exchanges/multipart-fetch" }, "keywords": [ "urql", - "formidablelabs", + "graphql", "exchanges" ], "main": "dist/urql-exchange-multipart-fetch", diff --git a/exchanges/persisted-fetch/package.json b/exchanges/persisted-fetch/package.json index d766d11d..f901b724 100644 --- a/exchanges/persisted-fetch/package.json +++ b/exchanges/persisted-fetch/package.json @@ -4,16 +4,16 @@ "description": "An exchange that allows for persisted queries support when fetching queries", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "exchanges/persisted-fetch" }, "keywords": [ "urql", - "formidablelabs", + "graphql", "persisted queries", "exchanges" ], diff --git a/exchanges/populate/package.json b/exchanges/populate/package.json index 17618de6..d842c844 100644 --- a/exchanges/populate/package.json +++ b/exchanges/populate/package.json @@ -4,16 +4,16 @@ "description": "An exchange that automaticcally populates the mutation selection body", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/advanced/auto-populate-mutations", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "exchanges/populate" }, "keywords": [ "urql", - "formidablelabs", + "graphql", "exchanges" ], "main": "dist/urql-exchange-populate", diff --git a/exchanges/refocus/package.json b/exchanges/refocus/package.json index b61c7655..a3accf04 100644 --- a/exchanges/refocus/package.json +++ b/exchanges/refocus/package.json @@ -4,17 +4,17 @@ "description": "An exchange that dispatches active operations when the window regains focus", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "exchanges/refocus" }, "keywords": [ "urql", "graphql client", - "formidablelabs", + "graphql", "exchanges", "react", "focus" diff --git a/exchanges/request-policy/package.json b/exchanges/request-policy/package.json index b3c5110a..e975711e 100644 --- a/exchanges/request-policy/package.json +++ b/exchanges/request-policy/package.json @@ -4,17 +4,17 @@ "description": "An exchange for operation request-policy upgrading in urql", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "exchanges/request-policy" }, "keywords": [ "urql", "graphql client", - "formidablelabs", + "graphql", "exchanges", "request-policy" ], diff --git a/exchanges/retry/package.json b/exchanges/retry/package.json index f885fa9f..a1ed973c 100644 --- a/exchanges/retry/package.json +++ b/exchanges/retry/package.json @@ -4,17 +4,17 @@ "description": "An exchange for operation retry support in urql", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "exchanges/retry" }, "keywords": [ "urql", "graphql client", - "formidablelabs", + "graphql", "exchanges", "retry" ], diff --git a/packages/core/package.json b/packages/core/package.json index b29cd56d..3d44b876 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -4,18 +4,18 @@ "description": "The shared core for the highly customizable and versatile GraphQL client", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "packages/core" }, "keywords": [ + "graphql", "graphql client", "state management", "cache", - "formidablelabs", "exchanges" ], "main": "dist/urql-core", diff --git a/packages/introspection/package.json b/packages/introspection/package.json index c895079a..b376df2d 100644 --- a/packages/introspection/package.json +++ b/packages/introspection/package.json @@ -4,18 +4,18 @@ "description": "Utilities for dealing with Introspection Queries and Client Schemas", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "packages/introspection" }, "keywords": [ + "graphql", "graphql client", "graphql schema", - "schema", - "formidablelabs" + "schema" ], "main": "dist/urql-introspection", "module": "dist/urql-introspection.mjs", diff --git a/packages/next-urql/README.md b/packages/next-urql/README.md index a0bc52e7..563aad65 100644 --- a/packages/next-urql/README.md +++ b/packages/next-urql/README.md @@ -5,9 +5,6 @@ NPM Version - - Test Status - ## `next-urql` @@ -30,7 +27,7 @@ yarn add next-urql react-is urql npm install --save next-urql react-is urql ``` -`react-is` helps to support server-side `Suspense` with `react-ssr-prepass`. This assumes you have followed the basic installation steps for `urql` [here](https://github.com/FormidableLabs/urql#installation). +`react-is` helps to support server-side `Suspense` with `react-ssr-prepass`. This assumes you have followed the basic installation steps for `urql` [here](https://github.com/urql-graphql/urql#installation). Note that if you are using Next before v9.4 you'll need to polyfill fetch, this can be done through [`isomorphic-unfetch`](https://www.npmjs.com/package/isomorphic-unfetch). @@ -225,15 +222,18 @@ If you want to use a `Client` in Next.js' newer methods like `getServerSideProps ```javascript import { initUrqlClient } from 'next-urql'; -export const getServerSideProps = async (ctx) => { - const client = initUrqlClient({ - url: '/graphql', - }, false /* set to false to disable suspense */); +export const getServerSideProps = async ctx => { + const client = initUrqlClient( + { + url: '/graphql', + }, + false /* set to false to disable suspense */ + ); const result = await client.query(QUERY, {}).toPromise(); return { - props: { data: result.data } + props: { data: result.data }, }; }; ``` diff --git a/packages/next-urql/package.json b/packages/next-urql/package.json index 082c13ef..26994c70 100644 --- a/packages/next-urql/package.json +++ b/packages/next-urql/package.json @@ -4,11 +4,11 @@ "description": "Convenience wrappers for using urql with NextJS.", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "packages/next-urql" }, "main": "dist/next-urql.js", diff --git a/packages/preact-urql/package.json b/packages/preact-urql/package.json index 61a85839..121ad2ce 100644 --- a/packages/preact-urql/package.json +++ b/packages/preact-urql/package.json @@ -4,18 +4,18 @@ "description": "A highly customizable and versatile GraphQL client for Preact", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "packages/preact-urql" }, "keywords": [ "graphql client", "state management", "cache", - "formidablelabs", + "graphql", "exchanges", "preact" ], diff --git a/packages/react-urql/package.json b/packages/react-urql/package.json index c6dcda89..8f3aeca3 100644 --- a/packages/react-urql/package.json +++ b/packages/react-urql/package.json @@ -4,18 +4,18 @@ "description": "A highly customizable and versatile GraphQL client for React", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "packages/react-urql" }, "keywords": [ "graphql client", "state management", "cache", - "formidablelabs", + "graphql", "exchanges", "react" ], diff --git a/packages/site/CHANGELOG.md b/packages/site/CHANGELOG.md index 3550201b..6c323d31 100644 --- a/packages/site/CHANGELOG.md +++ b/packages/site/CHANGELOG.md @@ -1,6 +1,7 @@ # urql-docs ## 1.0.0 + ### Major Changes -- **Goodbye IE11!** 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will _not_ be ES5-compatible anymore, by [@kitten](https://github.com/kitten) (See [#2504](https://github.com/FormidableLabs/urql/pull/2504)) +- **Goodbye IE11!** 👋 This major release removes support for IE11. All code that is shipped will be transpiled much less and will _not_ be ES5-compatible anymore, by [@kitten](https://github.com/kitten) (See [#2504](https://github.com/urql-graphql/urql/pull/2504)) diff --git a/packages/storage-rn/package.json b/packages/storage-rn/package.json index 8fbe277e..46f3caad 100644 --- a/packages/storage-rn/package.json +++ b/packages/storage-rn/package.json @@ -4,17 +4,17 @@ "sideEffects": false, "description": "Graphcache offline storage for React Native", "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "packages/storage-rn" }, "keywords": [ "urql", "graphql client", - "formidablelabs", + "graphql", "exchanges", "react native", "offline", diff --git a/packages/storybook-addon/package.json b/packages/storybook-addon/package.json index 525a1257..506e3ac7 100644 --- a/packages/storybook-addon/package.json +++ b/packages/storybook-addon/package.json @@ -3,19 +3,19 @@ "version": "2.0.1", "description": "Make stories in Storybook with urql", "sideEffects": false, - "homepage": "https://github.com/FormidableLabs/urql/tree/main/packages/storybook-addon", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "homepage": "https://github.com/urql-graphql/urql/tree/main/packages/storybook-addon", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "packages/storybook-addon" }, "keywords": [ "addon", "storybook", "urql", - "formidablelabs", + "graphql", "preact", "react", "storybook-addon", diff --git a/packages/svelte-urql/package.json b/packages/svelte-urql/package.json index 95a27e3d..b1a80301 100644 --- a/packages/svelte-urql/package.json +++ b/packages/svelte-urql/package.json @@ -4,18 +4,18 @@ "description": "A highly customizable and versatile GraphQL client for Svelte", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "packages/svelte-urql" }, "keywords": [ "graphql client", "state management", "cache", - "formidablelabs", + "graphql", "exchanges", "svelte" ], diff --git a/packages/vue-urql/package.json b/packages/vue-urql/package.json index 906c00f1..778561a0 100644 --- a/packages/vue-urql/package.json +++ b/packages/vue-urql/package.json @@ -4,18 +4,18 @@ "description": "A highly customizable and versatile GraphQL client for vue", "sideEffects": false, "homepage": "https://formidable.com/open-source/urql/docs/", - "bugs": "https://github.com/FormidableLabs/urql/issues", + "bugs": "https://github.com/urql-graphql/urql/issues", "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/FormidableLabs/urql.git", + "url": "https://github.com/urql-graphql/urql.git", "directory": "packages/vue-urql" }, "keywords": [ "graphql client", "state management", "cache", - "formidablelabs", + "graphql", "exchanges", "vue" ],