Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@speedlo/react-apollo-hooks

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@speedlo/react-apollo-hooks - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

15

es/useQuery.js

@@ -85,5 +85,14 @@ var __assign = (this && this.__assign) || function () {

}
return __assign({}, helpers, { data: data, error: new ApolloOperationError(result.errors && result.errors.length > 0
? new ApolloError({ graphQLErrors: result.errors })
: new ApolloError(__assign({}, result.error)), query, variables), errors: result.errors, loading: result.loading,
var apolloError;
if (result.errors && result.errors.length) {
apolloError = new ApolloError({ graphQLErrors: result.errors });
}
else if (result.error) {
apolloError = new ApolloError(__assign({}, result.error));
}
var error = apolloError
? new ApolloOperationError(apolloError, query, variables)
: undefined;
return __assign({}, helpers, { data: data,
error: error, errors: result.errors, loading: result.loading,
// don't try to return `networkStatus` when suspense it's used

@@ -90,0 +99,0 @@ // because it's unreliable in that case

2

lib/useQuery.d.ts
import ApolloClient, { ApolloCurrentResult, ApolloQueryResult, FetchMoreOptions, FetchMoreQueryOptions, NetworkStatus, ObservableQuery, OperationVariables, QueryOptions } from 'apollo-client';
import { DocumentNode } from 'graphql';
import { ApolloOperationError } from './ApolloOperationError';
import { Omit } from './utils';
export interface QueryHookState<TData> extends Pick<ApolloCurrentResult<undefined | TData>, 'error' | 'errors' | 'loading' | 'partial'> {
data?: TData;
error?: ApolloOperationError;
networkStatus: NetworkStatus | undefined;

@@ -7,0 +9,0 @@ }

@@ -87,5 +87,14 @@ "use strict";

}
return __assign({}, helpers, { data: data, error: new ApolloOperationError_1.ApolloOperationError(result.errors && result.errors.length > 0
? new apollo_client_1.ApolloError({ graphQLErrors: result.errors })
: new apollo_client_1.ApolloError(__assign({}, result.error)), query, variables), errors: result.errors, loading: result.loading,
var apolloError;
if (result.errors && result.errors.length) {
apolloError = new apollo_client_1.ApolloError({ graphQLErrors: result.errors });
}
else if (result.error) {
apolloError = new apollo_client_1.ApolloError(__assign({}, result.error));
}
var error = apolloError
? new ApolloOperationError_1.ApolloOperationError(apolloError, query, variables)
: undefined;
return __assign({}, helpers, { data: data,
error: error, errors: result.errors, loading: result.loading,
// don't try to return `networkStatus` when suspense it's used

@@ -92,0 +101,0 @@ // because it's unreliable in that case

{
"name": "@speedlo/react-apollo-hooks",
"version": "1.0.2",
"version": "1.0.3",
"description": "",

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc