Socket
Socket
Sign inDemoInstall

@apollo/client

Package Overview
Dependencies
11
Maintainers
1
Versions
554
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-beta.28 to 3.0.0-beta.29

2

cache/cache.cjs.js
var allExports = require('../apollo-client.cjs');
var names = new Set(["ApolloCache","Cache","isReference","makeReference","InMemoryCache","defaultDataIdFromObject"]);
Object.keys(allExports).forEach(name => {
Object.keys(allExports).forEach(function (name) {
if (names.has(name)) {

@@ -5,0 +5,0 @@ exports[name] = allExports[name];

var allExports = require('../apollo-client.cjs');
var names = new Set(["ApolloProvider","ApolloConsumer","getApolloContext","resetApolloContext","useQuery","useLazyQuery","useMutation","useSubscription","useApolloClient","RenderPromises","DocumentType","operationName","parser"]);
Object.keys(allExports).forEach(name => {
Object.keys(allExports).forEach(function (name) {
if (!names.has(name)) {

@@ -5,0 +5,0 @@ exports[name] = allExports[name];

@@ -20,3 +20,3 @@ import { invariant } from 'ts-invariant';

previousQuery.document === query.document ||
equal(previousQuery.document, query.document), 48) : invariant(!previousQuery ||
equal(previousQuery.document, query.document), 50) : invariant(!previousQuery ||
previousQuery.document === query.document ||

@@ -23,0 +23,0 @@ equal(previousQuery.document, query.document), 'Internal Error: may not update existing query string in store');

@@ -88,3 +88,3 @@ import { __extends } from 'tslib';

ApolloLink.prototype.request = function (operation, forward) {
throw process.env.NODE_ENV === "production" ? new InvariantError(5) : new InvariantError('request is not implemented');
throw process.env.NODE_ENV === "production" ? new InvariantError(12) : new InvariantError('request is not implemented');
};

@@ -91,0 +91,0 @@ ApolloLink.prototype.onError = function (reason) {

@@ -8,3 +8,3 @@ import { InvariantError } from 'ts-invariant';

library = 'node-fetch';
throw process.env.NODE_ENV === "production" ? new InvariantError(7) : new InvariantError('"fetch" has not been found globally and no fetcher has been ' +
throw process.env.NODE_ENV === "production" ? new InvariantError(14) : new InvariantError('"fetch" has not been found globally and no fetcher has been ' +
'configured. To fix this, install a fetch package ' +

@@ -11,0 +11,0 @@ ("(like https://www.npmjs.com/package/" + library + "), instantiate the ") +

@@ -9,3 +9,3 @@ import { InvariantError } from 'ts-invariant';

catch (e) {
var parseError = process.env.NODE_ENV === "production" ? new InvariantError(6) : new InvariantError("Network request failed. " + label + " is not serializable: " + e.message);
var parseError = process.env.NODE_ENV === "production" ? new InvariantError(13) : new InvariantError("Network request failed. " + label + " is not serializable: " + e.message);
parseError.parseError = e;

@@ -12,0 +12,0 @@ throw parseError;

{
"name": "@apollo/client",
"version": "3.0.0-beta.28",
"version": "3.0.0-beta.29",
"description": "A fully-featured caching GraphQL client.",

@@ -5,0 +5,0 @@ "private": false,

@@ -9,3 +9,3 @@ import { invariant } from 'ts-invariant';

return React.createElement(ApolloContext.Consumer, null, function (context) {
process.env.NODE_ENV === "production" ? invariant(context && context.client, 9) : invariant(context && context.client, 'Could not find "client" in the context of ApolloConsumer. ' +
process.env.NODE_ENV === "production" ? invariant(context && context.client, 6) : invariant(context && context.client, 'Could not find "client" in the context of ApolloConsumer. ' +
'Wrap the root component in an <ApolloProvider>.');

@@ -12,0 +12,0 @@ return props.children(context.client);

@@ -14,3 +14,3 @@ import { invariant } from 'ts-invariant';

}
process.env.NODE_ENV === "production" ? invariant(context.client, 8) : invariant(context.client, 'ApolloProvider was not passed a client instance. Make ' +
process.env.NODE_ENV === "production" ? invariant(context.client, 5) : invariant(context.client, 'ApolloProvider was not passed a client instance. Make ' +
'sure you pass in your client via the "client" prop.');

@@ -17,0 +17,0 @@ return (React.createElement(ApolloContext.Provider, { value: context }, children));

@@ -30,3 +30,3 @@ import { invariant } from 'ts-invariant';

(this.context && this.context.client);
process.env.NODE_ENV === "production" ? invariant(!!client, 49) : invariant(!!client, 'Could not find "client" in the context or passed in as an option. ' +
process.env.NODE_ENV === "production" ? invariant(!!client, 48) : invariant(!!client, 'Could not find "client" in the context or passed in as an option. ' +
'Wrap the root component in an <ApolloProvider>, or pass an ' +

@@ -49,3 +49,3 @@ 'ApolloClient instance in via options.');

var usedOperationName = operationName(operation.type);
process.env.NODE_ENV === "production" ? invariant(operation.type === type, 50) : invariant(operation.type === type, "Running a " + requiredOperationName + " requires a graphql " +
process.env.NODE_ENV === "production" ? invariant(operation.type === type, 49) : invariant(operation.type === type, "Running a " + requiredOperationName + " requires a graphql " +
(requiredOperationName + ", but a " + usedOperationName + " was used instead."));

@@ -52,0 +52,0 @@ };

@@ -8,3 +8,3 @@ import { invariant } from 'ts-invariant';

var client = React.useContext(getApolloContext()).client;
process.env.NODE_ENV === "production" ? invariant(client, 10) : invariant(client, 'No Apollo Client instance can be found. Please ensure that you ' +
process.env.NODE_ENV === "production" ? invariant(client, 7) : invariant(client, 'No Apollo Client instance can be found. Please ensure that you ' +
'have called `ApolloProvider` higher up in your tree.');

@@ -11,0 +11,0 @@ return client;

@@ -30,3 +30,3 @@ import { invariant } from 'ts-invariant';

var variables, type, name;
process.env.NODE_ENV === "production" ? invariant(!!document && !!document.kind, 11) : invariant(!!document && !!document.kind, "Argument of " + document + " passed to parser was not a valid GraphQL " +
process.env.NODE_ENV === "production" ? invariant(!!document && !!document.kind, 8) : invariant(!!document && !!document.kind, "Argument of " + document + " passed to parser was not a valid GraphQL " +
"DocumentNode. You may need to use 'graphql-tag' or another method " +

@@ -45,6 +45,6 @@ "to convert your operation into a document");

process.env.NODE_ENV === "production" ? invariant(!fragments.length ||
(queries.length || mutations.length || subscriptions.length), 12) : invariant(!fragments.length ||
(queries.length || mutations.length || subscriptions.length), 9) : invariant(!fragments.length ||
(queries.length || mutations.length || subscriptions.length), "Passing only a fragment to 'graphql' is not yet supported. " +
"You must include a query, subscription or mutation as well");
process.env.NODE_ENV === "production" ? invariant(queries.length + mutations.length + subscriptions.length <= 1, 13) : invariant(queries.length + mutations.length + subscriptions.length <= 1, "react-apollo only supports a query, subscription, or a mutation per HOC. " +
process.env.NODE_ENV === "production" ? invariant(queries.length + mutations.length + subscriptions.length <= 1, 10) : invariant(queries.length + mutations.length + subscriptions.length <= 1, "react-apollo only supports a query, subscription, or a mutation per HOC. " +
(document + " had " + queries.length + " queries, " + subscriptions.length + " ") +

@@ -61,3 +61,3 @@ ("subscriptions and " + mutations.length + " mutations. ") +

: subscriptions;
process.env.NODE_ENV === "production" ? invariant(definitions.length === 1, 14) : invariant(definitions.length === 1, "react-apollo only supports one definition per HOC. " + document + " had " +
process.env.NODE_ENV === "production" ? invariant(definitions.length === 1, 11) : invariant(definitions.length === 1, "react-apollo only supports one definition per HOC. " + document + " had " +
(definitions.length + " definitions. ") +

@@ -64,0 +64,0 @@ "You can use 'compose' to join multiple operation types to a component");

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

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 too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc