You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.0 KiB
29 lines
1.0 KiB
import { __rest } from "tslib"; |
|
import * as PropTypes from "prop-types"; |
|
import { useQuery } from "../hooks/index.js"; |
|
/** |
|
* @deprecated |
|
* Official support for React Apollo render prop components ended in March 2020. |
|
* This library is still included in the `@apollo/client` package, |
|
* but it no longer receives feature updates or bug fixes. |
|
*/ |
|
export function Query(props) { |
|
var children = props.children, query = props.query, options = __rest(props, ["children", "query"]); |
|
var result = useQuery(query, options); |
|
return result ? children(result) : null; |
|
} |
|
Query.propTypes = { |
|
client: PropTypes.object, |
|
children: PropTypes.func.isRequired, |
|
fetchPolicy: PropTypes.string, |
|
notifyOnNetworkStatusChange: PropTypes.bool, |
|
onCompleted: PropTypes.func, |
|
onError: PropTypes.func, |
|
pollInterval: PropTypes.number, |
|
query: PropTypes.object.isRequired, |
|
variables: PropTypes.object, |
|
ssr: PropTypes.bool, |
|
partialRefetch: PropTypes.bool, |
|
returnPartialData: PropTypes.bool, |
|
}; |
|
//# sourceMappingURL=Query.js.map
|