fix: Create a client config function that is retrieved when app is loading (#496)
* fix: Create a client config function that is retrieved when app is loaded * update index.tsx * fixed linter issues
This commit is contained in:
@ -1798,6 +1798,15 @@ export type GetUsersQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
export type GetUsersQuery = { __typename?: 'Query', findManyUser: Array<{ __typename?: 'User', id: string, email: string, displayName: string, firstName: string, lastName: string }> };
|
||||
|
||||
export type GetClientConfigQuery = {
|
||||
__typename?: 'Query';
|
||||
clientConfig: {
|
||||
__typename?: 'ClientConfig';
|
||||
display_google_login: boolean;
|
||||
prefill_login_with_seed: boolean;
|
||||
};
|
||||
};
|
||||
export type GetClientConfigQueryVariables = {};
|
||||
|
||||
export const CreateEventDocument = gql`
|
||||
mutation CreateEvent($type: String!, $data: JSON!) {
|
||||
@ -3080,4 +3089,39 @@ export function useGetUsersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<G
|
||||
}
|
||||
export type GetUsersQueryHookResult = ReturnType<typeof useGetUsersQuery>;
|
||||
export type GetUsersLazyQueryHookResult = ReturnType<typeof useGetUsersLazyQuery>;
|
||||
export type GetUsersQueryResult = Apollo.QueryResult<GetUsersQuery, GetUsersQueryVariables>;
|
||||
export type GetUsersQueryResult = Apollo.QueryResult<GetUsersQuery, GetUsersQueryVariables>;
|
||||
|
||||
export const GET_CLIENT_CONFIG = gql`
|
||||
query GetClientConfig {
|
||||
clientConfig {
|
||||
display_google_login
|
||||
prefill_login_with_seed
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export function useGetClientConfigQuery(
|
||||
baseOptions?: Apollo.QueryHookOptions<
|
||||
GetClientConfigQuery,
|
||||
GetClientConfigQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useQuery<GetClientConfigQuery, GetClientConfigQueryVariables>(
|
||||
GET_CLIENT_CONFIG,
|
||||
options,
|
||||
);
|
||||
}
|
||||
|
||||
export function useGetClientConfigLazyQuery(
|
||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||
GetClientConfigQuery,
|
||||
GetClientConfigQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useLazyQuery<
|
||||
GetClientConfigQuery,
|
||||
GetClientConfigQueryVariables
|
||||
>(GET_CLIENT_CONFIG, options);
|
||||
}
|
||||
Reference in New Issue
Block a user