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

@shopify/react-graphql

Package Overview
Dependencies
Maintainers
13
Versions
263
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/react-graphql - npm Package Compare versions

Comparing version 6.1.12 to 6.1.13

6

CHANGELOG.md

@@ -10,2 +10,8 @@ # Changelog

## [6.1.13] - 2020-06-24
### Changed
- Replace Apollo declarative Query component with `useQuery` hook ([#1519](https://github.com/Shopify/quilt/pull/1519))
## [6.1.9] - 2020-05-14

@@ -12,0 +18,0 @@

11

dist/src/Query.d.ts

@@ -1,8 +0,11 @@

import React from 'react';
/// <reference types="react" />
import { OperationVariables } from 'apollo-client';
import { QueryProps } from './types';
declare class QueryTypeClass<Data = any, Variables = OperationVariables> extends React.Component<QueryProps<Data, Variables>> {
import { DocumentNode } from 'graphql-typed';
import { QueryHookResult, QueryHookOptions } from './hooks';
interface QueryComponentOptions<Data, Variables> extends QueryHookOptions {
children: (result: QueryHookResult<Data, Variables>) => JSX.Element | null;
query: DocumentNode<Data, Variables>;
}
export declare const Query: typeof QueryTypeClass;
export declare function Query<Data = any, Variables = OperationVariables>({ children, query, ...options }: QueryComponentOptions<Data, Variables>): JSX.Element | null;
export {};
//# sourceMappingURL=Query.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importDefault(require("react"));
var react_components_1 = require("@apollo/react-components");
// eslint-disable-next-line react/prefer-stateless-function
var QueryTypeClass = /** @class */ (function (_super) {
tslib_1.__extends(QueryTypeClass, _super);
function QueryTypeClass() {
return _super !== null && _super.apply(this, arguments) || this;
}
return QueryTypeClass;
}(react_1.default.Component));
exports.Query = react_components_1.Query;
var hooks_1 = require("./hooks");
function Query(_a) {
var children = _a.children, query = _a.query, options = tslib_1.__rest(_a, ["children", "query"]);
var opts = [options];
var result = hooks_1.useQuery.apply(void 0, tslib_1.__spread([query], opts));
return children(result);
}
exports.Query = Query;
{
"name": "@shopify/react-graphql",
"version": "6.1.12",
"version": "6.1.13",
"license": "MIT",

@@ -28,3 +28,2 @@ "description": "Tools for creating type-safe and asynchronous GraphQL components for React",

"@apollo/react-common": ">=3.0.0 <4.0.0",
"@apollo/react-components": ">=3.0.0 <4.0.0",
"@apollo/react-hooks": ">=3.0.0 <4.0.0",

@@ -31,0 +30,0 @@ "@shopify/async": "^2.1.5",

Sorry, the diff of this file is not supported yet

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