-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GraphQL and TS for fetching and editing buckets (#2240)
- Loading branch information
Showing
32 changed files
with
1,330 additions
and
472 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
catalog/app/containers/Admin/BucketConfigSelection.generated.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core' | ||
import * as Types from '../../model/graphql/types.generated' | ||
|
||
export type BucketConfigSelectionFragment = { | ||
readonly __typename: 'BucketConfig' | ||
} & Pick< | ||
Types.BucketConfig, | ||
| 'name' | ||
| 'title' | ||
| 'iconUrl' | ||
| 'description' | ||
| 'relevanceScore' | ||
| 'overviewUrl' | ||
| 'tags' | ||
| 'linkedData' | ||
| 'fileExtensionsToIndex' | ||
| 'scannerParallelShardsDepth' | ||
| 'snsNotificationArn' | ||
| 'skipMetaDataIndexing' | ||
| 'lastIndexed' | ||
> | ||
|
||
export const BucketConfigSelectionFragmentDoc = ({ | ||
kind: 'Document', | ||
definitions: [ | ||
{ | ||
kind: 'FragmentDefinition', | ||
name: { kind: 'Name', value: 'BucketConfigSelection' }, | ||
typeCondition: { kind: 'NamedType', name: { kind: 'Name', value: 'BucketConfig' } }, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ kind: 'Field', name: { kind: 'Name', value: 'name' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'title' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'iconUrl' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'description' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'relevanceScore' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'overviewUrl' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'tags' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'linkedData' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'fileExtensionsToIndex' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'scannerParallelShardsDepth' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'snsNotificationArn' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'skipMetaDataIndexing' } }, | ||
{ kind: 'Field', name: { kind: 'Name', value: 'lastIndexed' } }, | ||
], | ||
}, | ||
}, | ||
], | ||
} as unknown) as DocumentNode<BucketConfigSelectionFragment, unknown> |
15 changes: 15 additions & 0 deletions
15
catalog/app/containers/Admin/BucketConfigSelection.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
fragment BucketConfigSelection on BucketConfig { | ||
name | ||
title | ||
iconUrl | ||
description | ||
relevanceScore | ||
overviewUrl | ||
tags | ||
linkedData | ||
fileExtensionsToIndex | ||
scannerParallelShardsDepth | ||
snsNotificationArn | ||
skipMetaDataIndexing | ||
lastIndexed | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core' | ||
import * as Types from '../../model/graphql/types.generated' | ||
|
||
import { | ||
BucketConfigSelectionFragment, | ||
BucketConfigSelectionFragmentDoc, | ||
} from './BucketConfigSelection.generated' | ||
|
||
export type containers_Admin_BucketConfigsQueryVariables = Types.Exact<{ | ||
[key: string]: never | ||
}> | ||
|
||
export type containers_Admin_BucketConfigsQuery = { readonly __typename: 'Query' } & { | ||
readonly bucketConfigs: ReadonlyArray< | ||
{ readonly __typename: 'BucketConfig' } & BucketConfigSelectionFragment | ||
> | ||
} | ||
|
||
export const containers_Admin_BucketConfigsDocument = ({ | ||
kind: 'Document', | ||
definitions: [ | ||
{ | ||
kind: 'OperationDefinition', | ||
operation: 'query', | ||
name: { kind: 'Name', value: 'containers_Admin_BucketConfigs' }, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'Field', | ||
name: { kind: 'Name', value: 'bucketConfigs' }, | ||
selectionSet: { | ||
kind: 'SelectionSet', | ||
selections: [ | ||
{ | ||
kind: 'FragmentSpread', | ||
name: { kind: 'Name', value: 'BucketConfigSelection' }, | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
...BucketConfigSelectionFragmentDoc.definitions, | ||
], | ||
} as unknown) as DocumentNode< | ||
containers_Admin_BucketConfigsQuery, | ||
containers_Admin_BucketConfigsQueryVariables | ||
> | ||
|
||
export { containers_Admin_BucketConfigsDocument as default } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# import BucketConfigSelection from "./BucketConfigSelection.graphql" | ||
|
||
query { | ||
bucketConfigs { ...BucketConfigSelection } | ||
} |
Oops, something went wrong.