wip: set up AppConfig provider, use value in Login screen, update gql
This commit is contained in:
parent
54428112f8
commit
5cfccb97b1
@ -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) {
|
||||||
|
5
src/operations/config.gql
Normal file
5
src/operations/config.gql
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
query getDeployedConfig {
|
||||||
|
getDeployedConfig {
|
||||||
|
allowNewUsers
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user