Skip to content

Commit

Permalink
Latest version of @urql/core requires a new client config
Browse files Browse the repository at this point in the history
Source documentation is here: urql-graphql/urql#3114 (comment)
  • Loading branch information
skoontastic committed Apr 15, 2023
1 parent 754221a commit 8e56e37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/movie-quotes-frontend/src/lib/quotes-api.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { createClient, gql } from '@urql/core'
import { createClient, gql, 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],
})

async function graphqlClientWrapper (method, gqlQuery, queryVariables = {}) {
Expand Down

0 comments on commit 8e56e37

Please # to comment.