Socket
Socket
Sign inDemoInstall

apollo-link-prismic

Package Overview
Dependencies
42
Maintainers
6
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0-alpha.0 to 1.1.0-alpha.1

10

dist/index.js

@@ -0,7 +1,7 @@

import { getRepositoryName, getGraphQLEndpoint, getRepositoryEndpoint, createClient } from '@prismicio/client';
import { createHttpLink } from '@apollo/client/core';
import { getGraphQLEndpoint, getEndpoint, createClient } from '@prismicio/client';
const createPrismicLink = (config) => {
const {
repositoryName,
repositoryName: providedRepositoryName,
fetch,

@@ -13,4 +13,8 @@ accessToken,

} = config;
let repositoryName = providedRepositoryName;
if (!repositoryName && providedURI) {
repositoryName = getRepositoryName(providedURI);
}
const uri = providedURI || getGraphQLEndpoint(repositoryName);
const apiEndpoint = providedApiEndpoint || getEndpoint(repositoryName);
const apiEndpoint = providedApiEndpoint || getRepositoryEndpoint(repositoryName);
const client = createClient(apiEndpoint, {

@@ -17,0 +21,0 @@ fetch,

{
"name": "apollo-link-prismic",
"version": "1.1.0-alpha.0",
"version": "1.1.0-alpha.1",
"description": "Apollo link for Prismic",

@@ -51,3 +51,3 @@ "keywords": [

"dependencies": {
"@prismicio/client": "^6.2.0"
"@prismicio/client": "^6.3.0"
},

@@ -54,0 +54,0 @@ "devDependencies": {

import type { ApolloLink, HttpOptions } from "@apollo/client/core";
import type { FetchLike } from "@prismicio/client";
import { FetchLike, getRepositoryName } from "@prismicio/client";
import { createHttpLink } from "@apollo/client/core";
import {
getEndpoint,
getRepositoryEndpoint,
getGraphQLEndpoint,

@@ -75,3 +75,3 @@ createClient,

const {
repositoryName,
repositoryName: providedRepositoryName,
fetch,

@@ -84,4 +84,11 @@ accessToken,

let repositoryName = providedRepositoryName;
if (!repositoryName && providedURI) {
repositoryName = getRepositoryName(providedURI);
}
const uri = providedURI || getGraphQLEndpoint(repositoryName);
const apiEndpoint = providedApiEndpoint || getEndpoint(repositoryName);
const apiEndpoint =
providedApiEndpoint || getRepositoryEndpoint(repositoryName);

@@ -88,0 +95,0 @@ const client = createClient(apiEndpoint, {

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc