Skip to content

Commit

Permalink
fix: remove validate_datasource mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
ifokeev committed Feb 17, 2024
1 parent 1e46020 commit f15cc2d
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 119 deletions.
41 changes: 0 additions & 41 deletions src/graphql/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,6 @@ export type String_Comparison_Exp = {
_similar?: InputMaybe<Scalars["String"]["input"]>;
};

export type ValidateSourceOutput = {
__typename?: "ValidateSourceOutput";
code: Scalars["String"]["output"];
message?: Maybe<Scalars["String"]["output"]>;
};

/** columns and relationships of "access_lists" */
export type Access_Lists = {
__typename?: "access_lists";
Expand Down Expand Up @@ -5744,7 +5738,6 @@ export type Mutation_Root = {
update_versions_by_pk?: Maybe<Versions>;
/** update multiples rows of table: "versions" */
update_versions_many?: Maybe<Array<Maybe<Versions_Mutation_Response>>>;
validate_datasource?: Maybe<ValidateSourceOutput>;
};

/** mutation root */
Expand Down Expand Up @@ -6961,11 +6954,6 @@ export type Mutation_RootUpdate_Versions_ManyArgs = {
updates: Array<Versions_Updates>;
};

/** mutation root */
export type Mutation_RootValidate_DatasourceArgs = {
id: Scalars["uuid"]["input"];
};

/** Boolean expression to compare columns of type "numeric". All fields are combined with logical 'AND'. */
export type Numeric_Comparison_Exp = {
_eq?: InputMaybe<Scalars["numeric"]["input"]>;
Expand Down Expand Up @@ -12444,19 +12432,6 @@ export type AllDataSourcesSubscription = {
}>;
};

export type ValidateDataSourceMutationVariables = Exact<{
id: Scalars["uuid"]["input"];
}>;

export type ValidateDataSourceMutation = {
__typename?: "mutation_root";
validate_datasource?: {
__typename?: "ValidateSourceOutput";
code: string;
message?: string | null;
} | null;
};

export type FetchTablesQueryVariables = Exact<{
id: Scalars["uuid"]["input"];
}>;
Expand Down Expand Up @@ -13811,21 +13786,6 @@ export function useAllDataSourcesSubscription<
AllDataSourcesSubscriptionVariables
>({ query: AllDataSourcesDocument, ...options }, handler);
}
export const ValidateDataSourceDocument = gql`
mutation ValidateDataSource($id: uuid!) {
validate_datasource(id: $id) {
code
message
}
}
`;

export function useValidateDataSourceMutation() {
return Urql.useMutation<
ValidateDataSourceMutation,
ValidateDataSourceMutationVariables
>(ValidateDataSourceDocument);
}
export const FetchTablesDocument = gql`
query FetchTables($id: uuid!) {
fetch_tables(datasource_id: $id) {
Expand Down Expand Up @@ -14701,7 +14661,6 @@ export const namedOperations = {
CreateBranch: "CreateBranch",
UpdateUserInfo: "UpdateUserInfo",
CreateDataSource: "CreateDataSource",
ValidateDataSource: "ValidateDataSource",
UpdateDataSource: "UpdateDataSource",
CheckConnection: "CheckConnection",
DeleteDataSource: "DeleteDataSource",
Expand Down
7 changes: 0 additions & 7 deletions src/graphql/gql/datasources.gql
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@ subscription AllDataSources(
}
}

mutation ValidateDataSource($id: uuid!) {
validate_datasource(id: $id) {
code
message
}
}

query FetchTables($id: uuid!) {
fetch_tables(datasource_id: $id) {
schema
Expand Down
66 changes: 0 additions & 66 deletions src/graphql/schemas/hasura.json
Original file line number Diff line number Diff line change
Expand Up @@ -1025,45 +1025,6 @@
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "ValidateSourceOutput",
"description": null,
"fields": [
{
"name": "code",
"description": null,
"args": [],
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "String",
"ofType": null
}
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "message",
"description": null,
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
"interfaces": [],
"enumValues": null,
"possibleTypes": null
},
{
"kind": "OBJECT",
"name": "__Directive",
Expand Down Expand Up @@ -42617,33 +42578,6 @@
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "validate_datasource",
"description": null,
"args": [
{
"name": "id",
"description": null,
"type": {
"kind": "NON_NULL",
"name": null,
"ofType": {
"kind": "SCALAR",
"name": "uuid",
"ofType": null
}
},
"defaultValue": null
}
],
"type": {
"kind": "OBJECT",
"name": "ValidateSourceOutput",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
}
],
"inputFields": null,
Expand Down
5 changes: 0 additions & 5 deletions src/hooks/useSources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
useCheckConnectionMutation,
useGenDataSchemasMutation,
useRunSourceSqlQueryMutation,
useValidateDataSourceMutation,
useUpdateDataSourceMutation,
useFetchMetaQuery,
useFetchTablesQuery,
Expand All @@ -34,8 +33,6 @@ export default ({ params = {} }: Props) => {
useGenDataSchemasMutation();
const [runQueryMutation, execRunQueryMutation] =
useRunSourceSqlQueryMutation();
const [validateMutation, execValidateMutation] =
useValidateDataSourceMutation();

const [metaData, execQueryMeta] = useFetchMetaQuery({
pause: true,
Expand Down Expand Up @@ -83,8 +80,6 @@ export default ({ params = {} }: Props) => {

runQueryMutation,
execRunQueryMutation,
validateMutation,
execValidateMutation,
genSchemaMutation,
execGenSchemaMutation,
},
Expand Down

0 comments on commit f15cc2d

Please sign in to comment.