UNPKG

react-relay

Version:

A framework for building GraphQL-driven React applications.

95 lines (76 loc) 2.04 kB
/** * 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 { Disposable, Fragment, FragmentType, RefetchableFragment, } from 'relay-runtime'; declare export var fragmentInput: Fragment< Example_user$fragmentType, Example_user$data, >; declare export var refetchableFragmentInput: RefetchableFragment< Example_user$fragmentType, Example_user$data, QueryVariables, >; declare export opaque type Example_user$fragmentType: FragmentType; export type Example_user$data = NonNullableData; export type Example_user$key = { +$data?: Example_user$data, +$fragmentSpreads: Example_user$fragmentType, ... }; export type NonNullableData = { +id: string, +count: number, }; export type NullableData = ?NonNullableData; export type NonNullablePluralData = $ReadOnlyArray<NonNullableData>; export type NullablePluralData = ?$ReadOnlyArray<NonNullableData>; export type AnotherNonNullableData = { +name: ?string, +friends: ?number, }; declare export var keyNonNullable: Example_user$key; declare export var keyNonNullablePlural: $ReadOnlyArray<Example_user$key>; declare export var keyNullablePlural: ?$ReadOnlyArray<Example_user$key>; declare export var keyNullable: ?Example_user$key; declare export var keyAnotherNonNullable: { +$data: AnotherNonNullableData, +$fragmentSpreads: FragmentType, ... }; declare export var keyAnotherNullable: ?{ +$data: AnotherNonNullableData, +$fragmentSpreads: FragmentType, ... }; declare export var fragmentData: { +$fragmentType: FragmentType, ... }; export type QueryOperation = { +variables: QueryVariables, +response: {...}, }; export type QueryVariables = { id: string, nickname: ?string, name: string, }; export type QueryVariablesSubset = { id: string, ... }; export type FetchFn<TVars> = (vars: TVars) => Disposable;