Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
91 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
query me { | ||
me { | ||
id | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './me';export * from './types'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* eslint-disable */ | ||
|
||
/** | ||
* ФАЙЛ ГЕНЕРИРУЕТСЯ АВТОМАТИЧЕСКИ, ПРАВИТЬ ЕГО НЕ НУЖНО | ||
* Команда для генерирования этого файла: "yarn generate:types" | ||
*/ | ||
|
||
|
||
import * as Types from './types'; | ||
|
||
import { gql } from '@apollo/client'; | ||
import * as Apollo from '@apollo/client'; | ||
export type MeQueryVariables = Types.Exact<{ [key: string]: never; }>; | ||
|
||
|
||
export type MeQuery = { __typename?: 'Query', me?: Types.Maybe<{ __typename?: 'User', id: string }> }; | ||
|
||
|
||
export const MeDocument = gql` | ||
query me { | ||
me { | ||
id | ||
} | ||
} | ||
`; | ||
|
||
/** | ||
* __useMeQuery__ | ||
* | ||
* To run a query within a React component, call `useMeQuery` and pass it any options that fit your needs. | ||
* When your component renders, `useMeQuery` 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 } = useMeQuery({ | ||
* variables: { | ||
* }, | ||
* }); | ||
*/ | ||
export function useMeQuery(baseOptions?: Apollo.QueryHookOptions<MeQuery, MeQueryVariables>) { | ||
return Apollo.useQuery<MeQuery, MeQueryVariables>(MeDocument, baseOptions); | ||
} | ||
export function useMeLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<MeQuery, MeQueryVariables>) { | ||
return Apollo.useLazyQuery<MeQuery, MeQueryVariables>(MeDocument, baseOptions); | ||
} | ||
export type MeQueryHookResult = ReturnType<typeof useMeQuery>; | ||
export type MeLazyQueryHookResult = ReturnType<typeof useMeLazyQuery>; | ||
export type MeQueryResult = Apollo.QueryResult<MeQuery, MeQueryVariables>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters