apollo-link-prismic
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -0,3 +1,3 @@ | ||
import { createHttpLink } from '@apollo/client/core'; | ||
import { getRepositoryName, getGraphQLEndpoint, getRepositoryEndpoint, createClient } from '@prismicio/client'; | ||
import { createHttpLink } from '@apollo/client/core'; | ||
@@ -4,0 +4,0 @@ const createPrismicLink = (config) => { |
{ | ||
"name": "apollo-link-prismic", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Apollo link for Prismic", | ||
@@ -51,7 +51,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@prismicio/client": "^6.4.1" | ||
"@prismicio/client": "^7.0.1" | ||
}, | ||
"devDependencies": { | ||
"@apollo/client": "^3.5.8", | ||
"@prismicio/types": "^0.1.24", | ||
"@size-limit/preset-small-lib": "^7.0.8", | ||
@@ -58,0 +57,0 @@ "@types/node-fetch": "^2.6.0", |
@@ -52,1 +52,23 @@ # apollo-link-prismic | ||
``` | ||
### Installation with React Native | ||
Using `apollo-link-prismic` in React Native applications requires additional setup. | ||
After installing `apollo-link-prismic`, install the following [URL Web API](https://developer.mozilla.org/en-US/docs/Web/API/URL_API) polyfill: | ||
```sh | ||
npm install react-native-url-polyfill | ||
``` | ||
Next, import the polyfill in your app’s entry file (typically this is App.js or index.js). | ||
```javascript | ||
// App.js or index.js | ||
import "react-native-url-polyfill/auto"; | ||
``` | ||
`apollo-link-prismic` can now be used throughout your app. | ||
**Note**: If the polyfill does not work after importing in your app's entry file, try the alternative ["Flexible" set up method described in `react-native-url-polyfill`'s documentation](https://github.com/charpeni/react-native-url-polyfill#option-2-flexible). |
import type { ApolloLink, HttpOptions } from "@apollo/client/core"; | ||
import { FetchLike, getRepositoryName } from "@prismicio/client"; | ||
import { createHttpLink } from "@apollo/client/core"; | ||
import { | ||
FetchLike, | ||
getRepositoryName, | ||
getRepositoryEndpoint, | ||
@@ -6,0 +7,0 @@ getGraphQLEndpoint, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
34761
22
275
74
+ Added@prismicio/client@7.16.0(transitive)
+ Addedimgix-url-builder@0.0.5(transitive)
- Removed@prismicio/client@6.9.0(transitive)
- Removed@prismicio/helpers@2.3.9(transitive)
- Removed@prismicio/richtext@2.1.5(transitive)
- Removed@prismicio/types@0.2.9(transitive)
- Removedimgix-url-builder@0.0.3(transitive)
Updated@prismicio/client@^7.0.1