@shopify/react-graphql
Advanced tools
Comparing version 6.1.12 to 6.1.13
@@ -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 @@ |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65797
13
- Removed@apollo/react-components@3.1.5(transitive)