Compare commits

..

6 Commits

Author SHA1 Message Date
Szilárd Dóró
7756103476 Merge pull request #1861 from nhost/changeset-release/main 2023-04-24 09:38:50 +02:00
github-actions[bot]
fef9456c12 chore: update versions 2023-04-23 19:36:24 +00:00
Szilárd Dóró
2d6d56f6b0 Merge pull request #1860 from nhost/fix/project-details
fix(dashboard): filter projects by workspace
2023-04-23 21:35:16 +02:00
Szilárd Dóró
f54be0fefd fix: don't break unit tests 2023-04-23 19:27:36 +02:00
Szilárd Dóró
4e76d388ab fix: remove unused query parameter 2023-04-23 16:42:33 +02:00
Szilárd Dóró
84b84ab785 fix: filter projects by workspace 2023-04-23 16:34:39 +02:00
8 changed files with 160 additions and 72 deletions

View File

@@ -1,5 +1,11 @@
# @nhost/dashboard
## 0.15.2
### Patch Changes
- 84b84ab7: fix(projects): filter projects by workspace
## 0.15.1
### Patch Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@nhost/dashboard",
"version": "0.15.1",
"version": "0.15.2",
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",

View File

@@ -1,7 +1,5 @@
import { mockApplication, mockWorkspace } from '@/tests/mocks';
import { queryClient, render, screen } from '@/tests/testUtils';
import type { Project } from '@/types/application';
import { ApplicationStatus } from '@/types/application';
import type { Workspace } from '@/types/workspace';
import { rest } from 'msw';
import { setupServer } from 'msw/node';
import { afterAll, beforeAll, vi } from 'vitest';
@@ -35,43 +33,6 @@ vi.mock('next/router', () => ({
}),
}));
const mockApplication: Project = {
id: '1',
name: 'Test Application',
slug: 'test-application',
appStates: [],
subdomain: '',
isProvisioned: true,
region: {
awsName: 'us-east-1',
city: 'New York',
countryCode: 'US',
id: '1',
},
createdAt: new Date().toISOString(),
deployments: [],
desiredState: ApplicationStatus.Live,
featureFlags: [],
providersUpdated: true,
githubRepository: { fullName: 'test/git-project' },
repositoryProductionBranch: null,
nhostBaseFolder: null,
plan: null,
config: {
hasura: {
adminSecret: 'nhost-admin-secret',
},
},
};
const mockWorkspace: Workspace = {
id: '1',
name: 'Test Workspace',
slug: 'test-workspace',
members: [],
applications: [mockApplication],
};
const server = setupServer(
rest.get('https://local.graphql.nhost.run/v1', (_req, res, ctx) =>
res(ctx.status(200)),

View File

@@ -2,7 +2,4 @@ query GetWorkspaceAndProject($workspaceSlug: String!, $projectSlug: String) {
workspaces(where: { slug: { _eq: $workspaceSlug } }) {
...Workspace
}
projects: apps(where: { slug: { _eq: $projectSlug } }) {
...Project
}
}

View File

@@ -6,6 +6,7 @@ import { getHasuraAdminSecret } from '@/utils/env';
import { useNhostClient, useUserData } from '@nhost/nextjs';
import { useQuery } from '@tanstack/react-query';
import { useRouter } from 'next/router';
import { useMemo } from 'react';
export interface UseCurrentWorkspaceAndProjectReturnType {
/**
@@ -48,14 +49,12 @@ export default function useCurrentWorkspaceAndProject(): UseCurrentWorkspaceAndP
isFetching,
refetch,
} = useQuery(
['currentWorkspaceAndProject', workspaceSlug, appSlug],
['currentWorkspaceAndProject', workspaceSlug],
() =>
client.graphql.request<{
workspaces: Workspace[];
projects?: Project[];
}>(GetWorkspaceAndProjectDocument, {
workspaceSlug: (workspaceSlug as string) || '',
projectSlug: (appSlug as string) || '',
}),
{
keepPreviousData: true,
@@ -66,6 +65,18 @@ export default function useCurrentWorkspaceAndProject(): UseCurrentWorkspaceAndP
},
);
// Return the current workspace and project if using the Nhost backend
const [currentWorkspace] = response?.data?.workspaces || [];
const currentProject = useMemo(
() =>
appSlug
? currentWorkspace?.projects?.find(
(project) => project.slug === appSlug,
)
: null,
[appSlug, currentWorkspace?.projects],
);
// Return a default project if working locally
if (!isPlatform) {
const localProject: Project = {
@@ -117,9 +128,6 @@ export default function useCurrentWorkspaceAndProject(): UseCurrentWorkspaceAndP
};
}
// Return the current workspace and project if using the Nhost backend
const [currentWorkspace] = response?.data?.workspaces || [];
const [currentProject] = response?.data?.projects || [];
const error = Array.isArray(response?.error || {})
? response?.error[0]
: response?.error;

View File

@@ -1,6 +1,5 @@
import type { Project } from '@/types/application';
import type { Project, Workspace } from '@/types/application';
import { ApplicationStatus } from '@/types/application';
import type { Workspace } from '@/types/workspace';
import { faker } from '@faker-js/faker';
import type { NhostSession } from '@nhost/nextjs';
import type { NextRouter } from 'next/router';
@@ -67,8 +66,8 @@ export const mockWorkspace: Workspace = {
id: '1',
name: 'Test Workspace',
slug: 'test-workspace',
members: [],
applications: [mockApplication],
workspaceMembers: [],
projects: [mockApplication],
};
export const mockSession: NhostSession = {

View File

@@ -1,12 +0,0 @@
import type { WorkspaceMembers } from '@/utils/__generated__/graphql';
import type { Project } from './application';
export type Workspace = {
id: string;
name: string;
slug: string;
creatorUserId?: string;
members: WorkspaceMembers[];
applications: Project[];
default?: boolean;
};

View File

@@ -27,6 +27,7 @@ export type Scalars = {
citext: any;
float64: any;
jsonb: any;
refresh_token_type: any;
smallint: any;
timestamp: any;
timestamptz: any;
@@ -904,6 +905,7 @@ export type ConfigConfig = {
functions?: Maybe<ConfigFunctions>;
global?: Maybe<ConfigGlobal>;
hasura: ConfigHasura;
observability?: Maybe<ConfigObservability>;
postgres?: Maybe<ConfigPostgres>;
provider?: Maybe<ConfigProvider>;
storage?: Maybe<ConfigStorage>;
@@ -917,6 +919,7 @@ export type ConfigConfigComparisonExp = {
functions?: InputMaybe<ConfigFunctionsComparisonExp>;
global?: InputMaybe<ConfigGlobalComparisonExp>;
hasura?: InputMaybe<ConfigHasuraComparisonExp>;
observability?: InputMaybe<ConfigObservabilityComparisonExp>;
postgres?: InputMaybe<ConfigPostgresComparisonExp>;
provider?: InputMaybe<ConfigProviderComparisonExp>;
storage?: InputMaybe<ConfigStorageComparisonExp>;
@@ -927,6 +930,7 @@ export type ConfigConfigInsertInput = {
functions?: InputMaybe<ConfigFunctionsInsertInput>;
global?: InputMaybe<ConfigGlobalInsertInput>;
hasura: ConfigHasuraInsertInput;
observability?: InputMaybe<ConfigObservabilityInsertInput>;
postgres?: InputMaybe<ConfigPostgresInsertInput>;
provider?: InputMaybe<ConfigProviderInsertInput>;
storage?: InputMaybe<ConfigStorageInsertInput>;
@@ -937,6 +941,7 @@ export type ConfigConfigUpdateInput = {
functions?: InputMaybe<ConfigFunctionsUpdateInput>;
global?: InputMaybe<ConfigGlobalUpdateInput>;
hasura?: InputMaybe<ConfigHasuraUpdateInput>;
observability?: InputMaybe<ConfigObservabilityUpdateInput>;
postgres?: InputMaybe<ConfigPostgresUpdateInput>;
provider?: InputMaybe<ConfigProviderUpdateInput>;
storage?: InputMaybe<ConfigStorageUpdateInput>;
@@ -1033,6 +1038,26 @@ export type ConfigGlobalUpdateInput = {
environment?: InputMaybe<Array<ConfigEnvironmentVariableUpdateInput>>;
};
export type ConfigGrafana = {
__typename?: 'ConfigGrafana';
adminPassword: Scalars['String'];
};
export type ConfigGrafanaComparisonExp = {
_and?: InputMaybe<Array<ConfigGrafanaComparisonExp>>;
_not?: InputMaybe<ConfigGrafanaComparisonExp>;
_or?: InputMaybe<Array<ConfigGrafanaComparisonExp>>;
adminPassword?: InputMaybe<ConfigStringComparisonExp>;
};
export type ConfigGrafanaInsertInput = {
adminPassword: Scalars['String'];
};
export type ConfigGrafanaUpdateInput = {
adminPassword?: InputMaybe<Scalars['String']>;
};
export type ConfigHasura = {
__typename?: 'ConfigHasura';
adminSecret: Scalars['String'];
@@ -1222,6 +1247,26 @@ export type ConfigLocaleComparisonExp = {
_nin?: InputMaybe<Array<Scalars['ConfigLocale']>>;
};
export type ConfigObservability = {
__typename?: 'ConfigObservability';
grafana?: Maybe<ConfigGrafana>;
};
export type ConfigObservabilityComparisonExp = {
_and?: InputMaybe<Array<ConfigObservabilityComparisonExp>>;
_not?: InputMaybe<ConfigObservabilityComparisonExp>;
_or?: InputMaybe<Array<ConfigObservabilityComparisonExp>>;
grafana?: InputMaybe<ConfigGrafanaComparisonExp>;
};
export type ConfigObservabilityInsertInput = {
grafana?: InputMaybe<ConfigGrafanaInsertInput>;
};
export type ConfigObservabilityUpdateInput = {
grafana?: InputMaybe<ConfigGrafanaUpdateInput>;
};
export type ConfigPortComparisonExp = {
_eq?: InputMaybe<Scalars['ConfigPort']>;
_in?: InputMaybe<Array<Scalars['ConfigPort']>>;
@@ -3490,14 +3535,22 @@ export type AuthRefreshTokens = {
__typename?: 'authRefreshTokens';
createdAt: Scalars['timestamptz'];
expiresAt: Scalars['timestamptz'];
metadata?: Maybe<Scalars['jsonb']>;
/** DEPRECATED: auto-generated refresh token id. Will be replaced by a genereric id column that will be used as a primary key, not the refresh token itself. Use refresh_token_hash instead. */
refreshToken: Scalars['uuid'];
refreshTokenHash?: Maybe<Scalars['String']>;
type: Scalars['refresh_token_type'];
/** An object relationship */
user: Users;
userId: Scalars['uuid'];
};
/** User refresh tokens. Hasura auth uses them to rotate new access tokens as long as the refresh token is not expired. Don't modify its structure as Hasura Auth relies on it to function properly. */
export type AuthRefreshTokensMetadataArgs = {
path?: InputMaybe<Scalars['String']>;
};
/** aggregated selection of "auth.refresh_tokens" */
export type AuthRefreshTokens_Aggregate = {
__typename?: 'authRefreshTokens_aggregate';
@@ -3538,6 +3591,11 @@ export type AuthRefreshTokens_Aggregate_Order_By = {
min?: InputMaybe<AuthRefreshTokens_Min_Order_By>;
};
/** append existing jsonb value of filtered columns with new jsonb value */
export type AuthRefreshTokens_Append_Input = {
metadata?: InputMaybe<Scalars['jsonb']>;
};
/** input type for inserting array relation for remote table "auth.refresh_tokens" */
export type AuthRefreshTokens_Arr_Rel_Insert_Input = {
data: Array<AuthRefreshTokens_Insert_Input>;
@@ -3552,8 +3610,10 @@ export type AuthRefreshTokens_Bool_Exp = {
_or?: InputMaybe<Array<AuthRefreshTokens_Bool_Exp>>;
createdAt?: InputMaybe<Timestamptz_Comparison_Exp>;
expiresAt?: InputMaybe<Timestamptz_Comparison_Exp>;
metadata?: InputMaybe<Jsonb_Comparison_Exp>;
refreshToken?: InputMaybe<Uuid_Comparison_Exp>;
refreshTokenHash?: InputMaybe<String_Comparison_Exp>;
type?: InputMaybe<Refresh_Token_Type_Comparison_Exp>;
user?: InputMaybe<Users_Bool_Exp>;
userId?: InputMaybe<Uuid_Comparison_Exp>;
};
@@ -3564,12 +3624,29 @@ export enum AuthRefreshTokens_Constraint {
RefreshTokensPkey = 'refresh_tokens_pkey'
}
/** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */
export type AuthRefreshTokens_Delete_At_Path_Input = {
metadata?: InputMaybe<Array<Scalars['String']>>;
};
/** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */
export type AuthRefreshTokens_Delete_Elem_Input = {
metadata?: InputMaybe<Scalars['Int']>;
};
/** delete key/value pair or string element. key/value pairs are matched based on their key value */
export type AuthRefreshTokens_Delete_Key_Input = {
metadata?: InputMaybe<Scalars['String']>;
};
/** input type for inserting data into table "auth.refresh_tokens" */
export type AuthRefreshTokens_Insert_Input = {
createdAt?: InputMaybe<Scalars['timestamptz']>;
expiresAt?: InputMaybe<Scalars['timestamptz']>;
metadata?: InputMaybe<Scalars['jsonb']>;
/** DEPRECATED: auto-generated refresh token id. Will be replaced by a genereric id column that will be used as a primary key, not the refresh token itself. Use refresh_token_hash instead. */
refreshToken?: InputMaybe<Scalars['uuid']>;
type?: InputMaybe<Scalars['refresh_token_type']>;
user?: InputMaybe<Users_Obj_Rel_Insert_Input>;
userId?: InputMaybe<Scalars['uuid']>;
};
@@ -3582,6 +3659,7 @@ export type AuthRefreshTokens_Max_Fields = {
/** DEPRECATED: auto-generated refresh token id. Will be replaced by a genereric id column that will be used as a primary key, not the refresh token itself. Use refresh_token_hash instead. */
refreshToken?: Maybe<Scalars['uuid']>;
refreshTokenHash?: Maybe<Scalars['String']>;
type?: Maybe<Scalars['refresh_token_type']>;
userId?: Maybe<Scalars['uuid']>;
};
@@ -3592,6 +3670,7 @@ export type AuthRefreshTokens_Max_Order_By = {
/** DEPRECATED: auto-generated refresh token id. Will be replaced by a genereric id column that will be used as a primary key, not the refresh token itself. Use refresh_token_hash instead. */
refreshToken?: InputMaybe<Order_By>;
refreshTokenHash?: InputMaybe<Order_By>;
type?: InputMaybe<Order_By>;
userId?: InputMaybe<Order_By>;
};
@@ -3603,6 +3682,7 @@ export type AuthRefreshTokens_Min_Fields = {
/** DEPRECATED: auto-generated refresh token id. Will be replaced by a genereric id column that will be used as a primary key, not the refresh token itself. Use refresh_token_hash instead. */
refreshToken?: Maybe<Scalars['uuid']>;
refreshTokenHash?: Maybe<Scalars['String']>;
type?: Maybe<Scalars['refresh_token_type']>;
userId?: Maybe<Scalars['uuid']>;
};
@@ -3613,6 +3693,7 @@ export type AuthRefreshTokens_Min_Order_By = {
/** DEPRECATED: auto-generated refresh token id. Will be replaced by a genereric id column that will be used as a primary key, not the refresh token itself. Use refresh_token_hash instead. */
refreshToken?: InputMaybe<Order_By>;
refreshTokenHash?: InputMaybe<Order_By>;
type?: InputMaybe<Order_By>;
userId?: InputMaybe<Order_By>;
};
@@ -3636,8 +3717,10 @@ export type AuthRefreshTokens_On_Conflict = {
export type AuthRefreshTokens_Order_By = {
createdAt?: InputMaybe<Order_By>;
expiresAt?: InputMaybe<Order_By>;
metadata?: InputMaybe<Order_By>;
refreshToken?: InputMaybe<Order_By>;
refreshTokenHash?: InputMaybe<Order_By>;
type?: InputMaybe<Order_By>;
user?: InputMaybe<Users_Order_By>;
userId?: InputMaybe<Order_By>;
};
@@ -3648,6 +3731,11 @@ export type AuthRefreshTokens_Pk_Columns_Input = {
refreshToken: Scalars['uuid'];
};
/** prepend existing jsonb value of filtered columns with new jsonb value */
export type AuthRefreshTokens_Prepend_Input = {
metadata?: InputMaybe<Scalars['jsonb']>;
};
/** select columns of table "auth.refresh_tokens" */
export enum AuthRefreshTokens_Select_Column {
/** column name */
@@ -3655,10 +3743,14 @@ export enum AuthRefreshTokens_Select_Column {
/** column name */
ExpiresAt = 'expiresAt',
/** column name */
Metadata = 'metadata',
/** column name */
RefreshToken = 'refreshToken',
/** column name */
RefreshTokenHash = 'refreshTokenHash',
/** column name */
Type = 'type',
/** column name */
UserId = 'userId'
}
@@ -3666,8 +3758,10 @@ export enum AuthRefreshTokens_Select_Column {
export type AuthRefreshTokens_Set_Input = {
createdAt?: InputMaybe<Scalars['timestamptz']>;
expiresAt?: InputMaybe<Scalars['timestamptz']>;
metadata?: InputMaybe<Scalars['jsonb']>;
/** DEPRECATED: auto-generated refresh token id. Will be replaced by a genereric id column that will be used as a primary key, not the refresh token itself. Use refresh_token_hash instead. */
refreshToken?: InputMaybe<Scalars['uuid']>;
type?: InputMaybe<Scalars['refresh_token_type']>;
userId?: InputMaybe<Scalars['uuid']>;
};
@@ -3683,9 +3777,11 @@ export type AuthRefreshTokens_Stream_Cursor_Input = {
export type AuthRefreshTokens_Stream_Cursor_Value_Input = {
createdAt?: InputMaybe<Scalars['timestamptz']>;
expiresAt?: InputMaybe<Scalars['timestamptz']>;
metadata?: InputMaybe<Scalars['jsonb']>;
/** DEPRECATED: auto-generated refresh token id. Will be replaced by a genereric id column that will be used as a primary key, not the refresh token itself. Use refresh_token_hash instead. */
refreshToken?: InputMaybe<Scalars['uuid']>;
refreshTokenHash?: InputMaybe<Scalars['String']>;
type?: InputMaybe<Scalars['refresh_token_type']>;
userId?: InputMaybe<Scalars['uuid']>;
};
@@ -3696,12 +3792,26 @@ export enum AuthRefreshTokens_Update_Column {
/** column name */
ExpiresAt = 'expiresAt',
/** column name */
Metadata = 'metadata',
/** column name */
RefreshToken = 'refreshToken',
/** column name */
Type = 'type',
/** column name */
UserId = 'userId'
}
export type AuthRefreshTokens_Updates = {
/** append existing jsonb value of filtered columns with new jsonb value */
_append?: InputMaybe<AuthRefreshTokens_Append_Input>;
/** delete the field or element with specified path (for JSON arrays, negative integers count from the end) */
_delete_at_path?: InputMaybe<AuthRefreshTokens_Delete_At_Path_Input>;
/** delete the array element with specified index (negative integers count from the end). throws an error if top level container is not an array */
_delete_elem?: InputMaybe<AuthRefreshTokens_Delete_Elem_Input>;
/** delete key/value pair or string element. key/value pairs are matched based on their key value */
_delete_key?: InputMaybe<AuthRefreshTokens_Delete_Key_Input>;
/** prepend existing jsonb value of filtered columns with new jsonb value */
_prepend?: InputMaybe<AuthRefreshTokens_Prepend_Input>;
/** sets the columns of the filtered rows to the given values */
_set?: InputMaybe<AuthRefreshTokens_Set_Input>;
where: AuthRefreshTokens_Bool_Exp;
@@ -11168,6 +11278,11 @@ export type Mutation_RootUpdateAuthProvidersArgs = {
/** mutation root */
export type Mutation_RootUpdateAuthRefreshTokenArgs = {
_append?: InputMaybe<AuthRefreshTokens_Append_Input>;
_delete_at_path?: InputMaybe<AuthRefreshTokens_Delete_At_Path_Input>;
_delete_elem?: InputMaybe<AuthRefreshTokens_Delete_Elem_Input>;
_delete_key?: InputMaybe<AuthRefreshTokens_Delete_Key_Input>;
_prepend?: InputMaybe<AuthRefreshTokens_Prepend_Input>;
_set?: InputMaybe<AuthRefreshTokens_Set_Input>;
pk_columns: AuthRefreshTokens_Pk_Columns_Input;
};
@@ -11175,6 +11290,11 @@ export type Mutation_RootUpdateAuthRefreshTokenArgs = {
/** mutation root */
export type Mutation_RootUpdateAuthRefreshTokensArgs = {
_append?: InputMaybe<AuthRefreshTokens_Append_Input>;
_delete_at_path?: InputMaybe<AuthRefreshTokens_Delete_At_Path_Input>;
_delete_elem?: InputMaybe<AuthRefreshTokens_Delete_Elem_Input>;
_delete_key?: InputMaybe<AuthRefreshTokens_Delete_Key_Input>;
_prepend?: InputMaybe<AuthRefreshTokens_Prepend_Input>;
_set?: InputMaybe<AuthRefreshTokens_Set_Input>;
where: AuthRefreshTokens_Bool_Exp;
};
@@ -13946,6 +14066,19 @@ export type Query_RootWorkspacesAggregateArgs = {
where?: InputMaybe<Workspaces_Bool_Exp>;
};
/** Boolean expression to compare columns of type "refresh_token_type". All fields are combined with logical 'AND'. */
export type Refresh_Token_Type_Comparison_Exp = {
_eq?: InputMaybe<Scalars['refresh_token_type']>;
_gt?: InputMaybe<Scalars['refresh_token_type']>;
_gte?: InputMaybe<Scalars['refresh_token_type']>;
_in?: InputMaybe<Array<Scalars['refresh_token_type']>>;
_is_null?: InputMaybe<Scalars['Boolean']>;
_lt?: InputMaybe<Scalars['refresh_token_type']>;
_lte?: InputMaybe<Scalars['refresh_token_type']>;
_neq?: InputMaybe<Scalars['refresh_token_type']>;
_nin?: InputMaybe<Array<Scalars['refresh_token_type']>>;
};
/** columns and relationships of "regions" */
export type Regions = {
__typename?: 'regions';
@@ -17706,7 +17839,7 @@ export type GetWorkspaceAndProjectQueryVariables = Exact<{
}>;
export type GetWorkspaceAndProjectQuery = { __typename?: 'query_root', workspaces: Array<{ __typename?: 'workspaces', id: any, name: string, slug: string, creatorUserId?: any | null, workspaceMembers: Array<{ __typename?: 'workspaceMembers', id: any, type: string, user: { __typename?: 'users', id: any, email?: any | null, displayName: string } }>, projects: Array<{ __typename?: 'apps', id: any, slug: string, name: string, repositoryProductionBranch: string, subdomain: string, isProvisioned: boolean, createdAt: any, desiredState: number, nhostBaseFolder: string, providersUpdated?: boolean | null, config?: { __typename?: 'ConfigConfig', hasura: { __typename?: 'ConfigHasura', adminSecret: string } } | null, featureFlags: Array<{ __typename?: 'featureFlags', description: string, id: any, name: string, value: string }>, appStates: Array<{ __typename?: 'appStateHistory', id: any, appId: any, message?: string | null, stateId: number, createdAt: any }>, region: { __typename?: 'regions', id: any, countryCode: string, awsName: string, city: string }, plan: { __typename?: 'plans', id: any, name: string, price: number, isFree: boolean }, githubRepository?: { __typename?: 'githubRepositories', fullName: string } | null, deployments: Array<{ __typename?: 'deployments', id: any, commitSHA: string, commitMessage?: string | null, commitUserName?: string | null, deploymentStartedAt?: any | null, deploymentEndedAt?: any | null, commitUserAvatarUrl?: string | null, deploymentStatus?: string | null }>, creator?: { __typename?: 'users', id: any, email?: any | null, displayName: string } | null }> }>, projects: Array<{ __typename?: 'apps', id: any, slug: string, name: string, repositoryProductionBranch: string, subdomain: string, isProvisioned: boolean, createdAt: any, desiredState: number, nhostBaseFolder: string, providersUpdated?: boolean | null, config?: { __typename?: 'ConfigConfig', hasura: { __typename?: 'ConfigHasura', adminSecret: string } } | null, featureFlags: Array<{ __typename?: 'featureFlags', description: string, id: any, name: string, value: string }>, appStates: Array<{ __typename?: 'appStateHistory', id: any, appId: any, message?: string | null, stateId: number, createdAt: any }>, region: { __typename?: 'regions', id: any, countryCode: string, awsName: string, city: string }, plan: { __typename?: 'plans', id: any, name: string, price: number, isFree: boolean }, githubRepository?: { __typename?: 'githubRepositories', fullName: string } | null, deployments: Array<{ __typename?: 'deployments', id: any, commitSHA: string, commitMessage?: string | null, commitUserName?: string | null, deploymentStartedAt?: any | null, deploymentEndedAt?: any | null, commitUserAvatarUrl?: string | null, deploymentStatus?: string | null }>, creator?: { __typename?: 'users', id: any, email?: any | null, displayName: string } | null }> };
export type GetWorkspaceAndProjectQuery = { __typename?: 'query_root', workspaces: Array<{ __typename?: 'workspaces', id: any, name: string, slug: string, creatorUserId?: any | null, workspaceMembers: Array<{ __typename?: 'workspaceMembers', id: any, type: string, user: { __typename?: 'users', id: any, email?: any | null, displayName: string } }>, projects: Array<{ __typename?: 'apps', id: any, slug: string, name: string, repositoryProductionBranch: string, subdomain: string, isProvisioned: boolean, createdAt: any, desiredState: number, nhostBaseFolder: string, providersUpdated?: boolean | null, config?: { __typename?: 'ConfigConfig', hasura: { __typename?: 'ConfigHasura', adminSecret: string } } | null, featureFlags: Array<{ __typename?: 'featureFlags', description: string, id: any, name: string, value: string }>, appStates: Array<{ __typename?: 'appStateHistory', id: any, appId: any, message?: string | null, stateId: number, createdAt: any }>, region: { __typename?: 'regions', id: any, countryCode: string, awsName: string, city: string }, plan: { __typename?: 'plans', id: any, name: string, price: number, isFree: boolean }, githubRepository?: { __typename?: 'githubRepositories', fullName: string } | null, deployments: Array<{ __typename?: 'deployments', id: any, commitSHA: string, commitMessage?: string | null, commitUserName?: string | null, deploymentStartedAt?: any | null, deploymentEndedAt?: any | null, commitUserAvatarUrl?: string | null, deploymentStatus?: string | null }>, creator?: { __typename?: 'users', id: any, email?: any | null, displayName: string } | null }> }> };
export type InsertApplicationMutationVariables = Exact<{
app: Apps_Insert_Input;
@@ -18827,12 +18960,8 @@ export const GetWorkspaceAndProjectDocument = gql`
workspaces(where: {slug: {_eq: $workspaceSlug}}) {
...Workspace
}
projects: apps(where: {slug: {_eq: $projectSlug}}) {
...Project
}
}
${WorkspaceFragmentDoc}
${ProjectFragmentDoc}`;
${WorkspaceFragmentDoc}`;
/**
* __useGetWorkspaceAndProjectQuery__