UNPKG

786 BJavaScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @emails oncall+relay
8 *
9 * @format
10 */
11'use strict';
12
13var useIsOperationNodeActive = require('./useIsOperationNodeActive');
14
15var useStaticFragmentNodeWarning = require('./useStaticFragmentNodeWarning');
16
17var _require = require('relay-runtime'),
18 getFragment = _require.getFragment;
19
20function useIsParentQueryActive(fragmentInput, fragmentRef) {
21 var fragmentNode = getFragment(fragmentInput);
22 useStaticFragmentNodeWarning(fragmentNode, 'first argument of useIsParentQueryActive()');
23 return useIsOperationNodeActive(fragmentNode, fragmentRef);
24}
25
26module.exports = useIsParentQueryActive;
\No newline at end of file