-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
HumanWithNullWeight.tsx
61 lines (57 loc) · 2.24 KB
/
HumanWithNullWeight.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import * as Types from '../types.d.js';
import { gql } from '@apollo/client';
import { HumanFieldsFragmentDoc } from './HumanFields.js';
import * as Apollo from '@apollo/client';
const defaultOptions = {} as const;
export type HumanWithNullHeightQueryVariables = Types.Exact<{ [key: string]: never }>;
export type HumanWithNullHeightQuery = {
__typename?: 'Query';
human?: { __typename?: 'Human'; name: string; mass?: number | null } | null;
};
export const HumanWithNullHeightDocument = gql`
query HumanWithNullHeight {
human(id: 1004) {
...HumanFields
}
}
${HumanFieldsFragmentDoc}
`;
/**
* __useHumanWithNullHeightQuery__
*
* To run a query within a React component, call `useHumanWithNullHeightQuery` and pass it any options that fit your needs.
* When your component renders, `useHumanWithNullHeightQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useHumanWithNullHeightQuery({
* variables: {
* },
* });
*/
export function useHumanWithNullHeightQuery(
baseOptions?: Apollo.QueryHookOptions<HumanWithNullHeightQuery, HumanWithNullHeightQueryVariables>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<HumanWithNullHeightQuery, HumanWithNullHeightQueryVariables>(
HumanWithNullHeightDocument,
options
);
}
export function useHumanWithNullHeightLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<HumanWithNullHeightQuery, HumanWithNullHeightQueryVariables>
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<HumanWithNullHeightQuery, HumanWithNullHeightQueryVariables>(
HumanWithNullHeightDocument,
options
);
}
export type HumanWithNullHeightQueryHookResult = ReturnType<typeof useHumanWithNullHeightQuery>;
export type HumanWithNullHeightLazyQueryHookResult = ReturnType<typeof useHumanWithNullHeightLazyQuery>;
export type HumanWithNullHeightQueryResult = Apollo.QueryResult<
HumanWithNullHeightQuery,
HumanWithNullHeightQueryVariables
>;