/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow strict-local
 * @format
 * @oncall relay
 */

'use strict';

import type {UserConstantDependentResolver$key} from './__generated__/UserConstantDependentResolver.graphql';

const {graphql} = require('relay-runtime');
const {readFragment} = require('relay-runtime/store/ResolverFragments');

/**
 * @RelayResolver
 * @fieldName constant_dependent
 * @rootFragment UserConstantDependentResolver
 * @onType User
 */
function constant_dependent(
  rootKey: UserConstantDependentResolver$key,
): number {
  const user = readFragment(
    graphql`
      fragment UserConstantDependentResolver on User {
        constant
      }
    `,
    rootKey,
  );
  // $FlowFixMe[prop-missing]
  constant_dependent._relayResolverTestCallCount =
    // $FlowFixMe[prop-missing]
    (constant_dependent._relayResolverTestCallCount ?? 0) + 1;
  return (user.constant ?? NaN) + 1;
}

module.exports = {
  constant_dependent,
};

/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 * @flow strict-local
 * @format
 * @oncall relay
 */

'use strict';

import type {UserConstantDependentResolver$key} from './__generated__/UserConstantDependentResolver.graphql';

const {graphql} = require('relay-runtime');
const {readFragment} = require('relay-runtime/store/ResolverFragments');

/**
 * @RelayResolver
 * @fieldName constant_dependent
 * @rootFragment UserConstantDependentResolver
 * @onType User
 */
function constant_dependent(
  rootKey: UserConstantDependentResolver$key,
): number {
  const user = readFragment(
    graphql`
      fragment UserConstantDependentResolver on User {
        constant
      }
    `,
    rootKey,
  );
  constant_dependent._relayResolverTestCallCount =
    (constant_dependent._relayResolverTestCallCount ?? 0) + 1;
  return (user.constant ?? NaN) + 1;
}
constant_dependent._relayResolverTestCallCount = (undefined: number | void);

module.exports = {
  constant_dependent,
};

Fix some issues exposed when making function statics sealed
Fix some issues exposed when making function statics sealed

Reviewed By: SamChou19815

Differential Revision: D40736389

fbshipit-source-id: a3e1c3f5723081bf76e2dbdb637b4deb7a54e180
