From b0ce37121073fefa50ca835406b0369885494f51 Mon Sep 17 00:00:00 2001 From: Litterio Andrea Guainella Date: Sun, 30 Apr 2023 09:09:35 +0200 Subject: [PATCH] Update movie-quotes-app-tutorial.md fix `Cannot read properties of undefined (reading 'reduceRight')` error according v4 as mention in `https://github.com/urql-graphql/urql/issues/3114#no-more-defaultexchanges-` --- docs/getting-started/movie-quotes-app-tutorial.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/getting-started/movie-quotes-app-tutorial.md b/docs/getting-started/movie-quotes-app-tutorial.md index fa55de6cc3..60f828753f 100644 --- a/docs/getting-started/movie-quotes-app-tutorial.md +++ b/docs/getting-started/movie-quotes-app-tutorial.md @@ -539,11 +539,12 @@ create a new URQL client: ```javascript // src/lib/quotes-api.js -import { createClient } from '@urql/core'; +import { createClient, cacheExchange, fetchExchange } from '@urql/core'; const graphqlClient = createClient({ url: import.meta.env.PUBLIC_GRAPHQL_API_ENDPOINT, - requestPolicy: "network-only" + requestPolicy: "network-only", + exchanges: [cacheExchange, fetchExchange] }); ```