wip: set up AppConfig provider, use value in Login screen, update gql

This commit is contained in:
Loewy 2024-03-19 14:08:00 -07:00
parent 54428112f8
commit 5cfccb97b1
2 changed files with 87 additions and 0 deletions

View File

@ -482,6 +482,16 @@ export type GetAggregatedShotMetricsQuery = {
}>; }>;
}; };
export type GetDeployedConfigQueryVariables = Exact<{ [key: string]: never }>;
export type GetDeployedConfigQuery = {
__typename?: "Query";
getDeployedConfig: {
__typename?: "DeployedConfigGQL";
allowNewUsers: boolean;
};
};
export type GetFeedQueryVariables = Exact<{ export type GetFeedQueryVariables = Exact<{
limit?: Scalars["Int"]["input"]; limit?: Scalars["Int"]["input"];
after?: InputMaybe<Scalars["String"]["input"]>; after?: InputMaybe<Scalars["String"]["input"]>;
@ -798,6 +808,78 @@ export type GetAggregatedShotMetricsQueryResult = Apollo.QueryResult<
GetAggregatedShotMetricsQuery, GetAggregatedShotMetricsQuery,
GetAggregatedShotMetricsQueryVariables GetAggregatedShotMetricsQueryVariables
>; >;
export const GetDeployedConfigDocument = gql`
query getDeployedConfig {
getDeployedConfig {
allowNewUsers
}
}
`;
/**
* __useGetDeployedConfigQuery__
*
* To run a query within a React component, call `useGetDeployedConfigQuery` and pass it any options that fit your needs.
* When your component renders, `useGetDeployedConfigQuery` 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 } = useGetDeployedConfigQuery({
* variables: {
* },
* });
*/
export function useGetDeployedConfigQuery(
baseOptions?: Apollo.QueryHookOptions<
GetDeployedConfigQuery,
GetDeployedConfigQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
GetDeployedConfigQuery,
GetDeployedConfigQueryVariables
>(GetDeployedConfigDocument, options);
}
export function useGetDeployedConfigLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetDeployedConfigQuery,
GetDeployedConfigQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetDeployedConfigQuery,
GetDeployedConfigQueryVariables
>(GetDeployedConfigDocument, options);
}
export function useGetDeployedConfigSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetDeployedConfigQuery,
GetDeployedConfigQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetDeployedConfigQuery,
GetDeployedConfigQueryVariables
>(GetDeployedConfigDocument, options);
}
export type GetDeployedConfigQueryHookResult = ReturnType<
typeof useGetDeployedConfigQuery
>;
export type GetDeployedConfigLazyQueryHookResult = ReturnType<
typeof useGetDeployedConfigLazyQuery
>;
export type GetDeployedConfigSuspenseQueryHookResult = ReturnType<
typeof useGetDeployedConfigSuspenseQuery
>;
export type GetDeployedConfigQueryResult = Apollo.QueryResult<
GetDeployedConfigQuery,
GetDeployedConfigQueryVariables
>;
export const GetFeedDocument = gql` export const GetFeedDocument = gql`
query GetFeed($limit: Int! = 5, $after: String = null) { query GetFeed($limit: Int! = 5, $after: String = null) {
getVideoFeedForUser(limit: $limit, after: $after) { getVideoFeedForUser(limit: $limit, after: $after) {

View File

@ -0,0 +1,5 @@
query getDeployedConfig {
getDeployedConfig {
allowNewUsers
}
}