Skip to content

Commit

Permalink
params
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu-dev committed Dec 3, 2024
1 parent ce498be commit 1b90806
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions graphql-server/schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ type Remote {
name: String!
url: String!
fetchSpecs: [String!]!
params: String
}

type RemoteList {
Expand Down
5 changes: 5 additions & 0 deletions graphql-server/src/remotes/remote.model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Field, ID, ObjectType } from "@nestjs/graphql";
import { __Type } from "graphql";
import { RawRow } from "src/queryFactory/types";
import { ListOffsetRes } from "src/utils/commonTypes";

Expand All @@ -15,6 +16,9 @@ export class Remote {

@Field(_type => [String])
fetchSpecs: string[];

@Field({ nullable: true })
params?: string;
}

@ObjectType()
Expand All @@ -29,5 +33,6 @@ export function fromDoltRemotesRow(databaseName: string, r: RawRow): Remote {
name: r.name,
url: r.url,
fetchSpecs: r.fetch_specs,
params: r.params,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function Inner({ remotes }: InnerProps) {
<th>Name</th>
<th>Url</th>
<th>Fetch Specs</th>
<th>Params</th>
</tr>
</thead>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export default function Row({ remote }: Props) {
</span>
))}
</td>
<td>{remote.params}</td>
</tr>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const REMOTES_FOR_REMOTES_PAGE_QUERY = gql`
name
url
fetchSpecs
params
}
query RemoteList($databaseName: String!, $offset: Int) {
remotes(databaseName: $databaseName, offset: $offset) {
Expand Down
6 changes: 4 additions & 2 deletions web/renderer/gen/graphql-types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ export type Remote = {
_id: Scalars['ID']['output'];
fetchSpecs: Array<Scalars['String']['output']>;
name: Scalars['String']['output'];
params?: Maybe<Scalars['String']['output']>;
url: Scalars['String']['output'];
};

Expand Down Expand Up @@ -1182,15 +1183,15 @@ export type DeleteTagMutationVariables = Exact<{

export type DeleteTagMutation = { __typename?: 'Mutation', deleteTag: boolean };

export type RemoteFragment = { __typename?: 'Remote', _id: string, name: string, url: string, fetchSpecs: Array<string> };
export type RemoteFragment = { __typename?: 'Remote', _id: string, name: string, url: string, fetchSpecs: Array<string>, params?: string | null };

export type RemoteListQueryVariables = Exact<{
databaseName: Scalars['String']['input'];
offset?: InputMaybe<Scalars['Int']['input']>;
}>;


export type RemoteListQuery = { __typename?: 'Query', remotes: { __typename?: 'RemoteList', nextOffset?: number | null, list: Array<{ __typename?: 'Remote', _id: string, name: string, url: string, fetchSpecs: Array<string> }> } };
export type RemoteListQuery = { __typename?: 'Query', remotes: { __typename?: 'RemoteList', nextOffset?: number | null, list: Array<{ __typename?: 'Remote', _id: string, name: string, url: string, fetchSpecs: Array<string>, params?: string | null }> } };

export type LoadDataMutationVariables = Exact<{
databaseName: Scalars['String']['input'];
Expand Down Expand Up @@ -1616,6 +1617,7 @@ export const RemoteFragmentDoc = gql`
name
url
fetchSpecs
params
}
`;
export const ColumnForDataTableFragmentDoc = gql`
Expand Down

0 comments on commit 1b90806

Please sign in to comment.