From 89baee6e2843dde3e36cb4d6fa75f36488c41b6b Mon Sep 17 00:00:00 2001 From: 0xff-dev Date: Sat, 18 Nov 2023 23:17:00 +0800 Subject: [PATCH] feat: dataset graphql api --- api/v1alpha1/versioneddataset_types.go | 3 + api/v1alpha1/zz_generated.deepcopy.go | 1 + ....kubeagi.k8s.com.cn_versioneddatasets.yaml | 9 + deploy/charts/arcadia/Chart.yaml | 2 +- ....kubeagi.k8s.com.cn_versioneddatasets.yaml | 9 + gqlgen.yaml | 36 + .../go-server/graph/generated/generated.go | 11523 +++++++++++----- .../go-server/graph/generated/models_gen.go | 252 + .../go-server/graph/impl/dataset.resolvers.go | 106 + .../graph/impl/versioned_dataset.resolvers.go | 81 + .../go-server/graph/schema/dataset.graphqls | 155 + .../graph/schema/entrypoint.graphqls | 2 +- .../graph/schema/versioned_dataset.graphqls | 189 + .../go-server/pkg/dataset/dataset.go | 224 + 14 files changed, 9296 insertions(+), 3296 deletions(-) create mode 100644 graphql-server/go-server/graph/impl/dataset.resolvers.go create mode 100644 graphql-server/go-server/graph/impl/versioned_dataset.resolvers.go create mode 100644 graphql-server/go-server/graph/schema/dataset.graphqls create mode 100644 graphql-server/go-server/graph/schema/versioned_dataset.graphqls create mode 100644 graphql-server/go-server/pkg/dataset/dataset.go diff --git a/api/v1alpha1/versioneddataset_types.go b/api/v1alpha1/versioneddataset_types.go index 6f4cb6839..05fe2a1b4 100644 --- a/api/v1alpha1/versioneddataset_types.go +++ b/api/v1alpha1/versioneddataset_types.go @@ -48,6 +48,9 @@ type VersionedDatasetSpec struct { // Which version of the dataset it inherits from InheritedFrom string `json:"inheritedFrom,omitempty"` + + // DisplayName + CommonSpec `json:",inline"` } type FileStatus struct { diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 2f7c9fb7b..df723ba7a 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -1200,6 +1200,7 @@ func (in *VersionedDatasetSpec) DeepCopyInto(out *VersionedDatasetSpec) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + out.CommonSpec = in.CommonSpec } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionedDatasetSpec. diff --git a/config/crd/bases/arcadia.kubeagi.k8s.com.cn_versioneddatasets.yaml b/config/crd/bases/arcadia.kubeagi.k8s.com.cn_versioneddatasets.yaml index cddb730b1..03f5dd3fa 100644 --- a/config/crd/bases/arcadia.kubeagi.k8s.com.cn_versioneddatasets.yaml +++ b/config/crd/bases/arcadia.kubeagi.k8s.com.cn_versioneddatasets.yaml @@ -42,6 +42,9 @@ spec: spec: description: VersionedDatasetSpec defines the desired state of VersionedDataset properties: + creator: + description: Creator defines datasource creator (AUTO-FILLED by webhook) + type: string dataset: description: Dataset which this `VersionedDataset` belongs to properties: @@ -64,6 +67,12 @@ spec: - kind - name type: object + description: + description: Description defines datasource description + type: string + displayName: + description: DisplayName defines datasource display name + type: string fileGroups: description: FileGroups included in this `VersionedDataset` Grouped by Datasource diff --git a/deploy/charts/arcadia/Chart.yaml b/deploy/charts/arcadia/Chart.yaml index e796a9621..544905d3b 100644 --- a/deploy/charts/arcadia/Chart.yaml +++ b/deploy/charts/arcadia/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: arcadia description: A Helm chart(KubeBB Component) for KubeAGI Arcadia type: application -version: 0.1.26 +version: 0.1.27 appVersion: "0.0.1" keywords: diff --git a/deploy/charts/arcadia/crds/arcadia.kubeagi.k8s.com.cn_versioneddatasets.yaml b/deploy/charts/arcadia/crds/arcadia.kubeagi.k8s.com.cn_versioneddatasets.yaml index cddb730b1..03f5dd3fa 100644 --- a/deploy/charts/arcadia/crds/arcadia.kubeagi.k8s.com.cn_versioneddatasets.yaml +++ b/deploy/charts/arcadia/crds/arcadia.kubeagi.k8s.com.cn_versioneddatasets.yaml @@ -42,6 +42,9 @@ spec: spec: description: VersionedDatasetSpec defines the desired state of VersionedDataset properties: + creator: + description: Creator defines datasource creator (AUTO-FILLED by webhook) + type: string dataset: description: Dataset which this `VersionedDataset` belongs to properties: @@ -64,6 +67,12 @@ spec: - kind - name type: object + description: + description: Description defines datasource description + type: string + displayName: + description: DisplayName defines datasource display name + type: string fileGroups: description: FileGroups included in this `VersionedDataset` Grouped by Datasource diff --git a/gqlgen.yaml b/gqlgen.yaml index 2d55d02cf..e98134f12 100644 --- a/gqlgen.yaml +++ b/gqlgen.yaml @@ -141,3 +141,39 @@ models: resolver: true listKnowledgeBases: resolver: true + DatasetQuery: + fields: + getDataset: + resolver: true + listDatasets: + resolver: true + DatasetMutation: + fields: + createDataset: + resolver: true + updateDataset: + resolver: true + deleteDatasets: + resolver: true + Dataset: + fields: + versions: + resolver: true + VersionedDatasetQuery: + fields: + getVersionedDataset: + resolver: true + listVersionedDatasets: + resolver: true + VersionedDatasetMutation: + fields: + createVersionedDataset: + resolver: true + updateVersionedDataset: + resolver: true + deleteVersionedDatasets: + resolver: true + VersionedDataset: + fields: + files: + resolver: true diff --git a/graphql-server/go-server/graph/generated/generated.go b/graphql-server/go-server/graph/generated/generated.go index 929d5ce45..fde1c9b16 100644 --- a/graphql-server/go-server/graph/generated/generated.go +++ b/graphql-server/go-server/graph/generated/generated.go @@ -38,6 +38,9 @@ type Config struct { } type ResolverRoot interface { + Dataset() DatasetResolver + DatasetMutation() DatasetMutationResolver + DatasetQuery() DatasetQueryResolver DatasourceMutation() DatasourceMutationResolver DatasourceQuery() DatasourceQueryResolver EmbedderMutation() EmbedderMutationResolver @@ -48,12 +51,40 @@ type ResolverRoot interface { ModelQuery() ModelQueryResolver Mutation() MutationResolver Query() QueryResolver + VersionedDataset() VersionedDatasetResolver + VersionedDatasetMutation() VersionedDatasetMutationResolver + VersionedDatasetQuery() VersionedDatasetQueryResolver } type DirectiveRoot struct { } type ComplexityRoot struct { + Dataset struct { + Annotations func(childComplexity int) int + ContentType func(childComplexity int) int + Creator func(childComplexity int) int + DisplayName func(childComplexity int) int + Field func(childComplexity int) int + Labels func(childComplexity int) int + Name func(childComplexity int) int + Namespace func(childComplexity int) int + UpdateTimestamp func(childComplexity int) int + VersionCount func(childComplexity int) int + Versions func(childComplexity int, input ListVersionedDatasetInput) int + } + + DatasetMutation struct { + CreateDataset func(childComplexity int, input *CreateDatasetInput) int + DeleteDatasets func(childComplexity int, input *DeleteDatasetInput) int + UpdateDataset func(childComplexity int, input *UpdateDatasetInput) int + } + + DatasetQuery struct { + GetDataset func(childComplexity int, name string, namespace string) int + ListDatasets func(childComplexity int, input *ListDatasetInput) int + } + Datasource struct { Annotations func(childComplexity int) int Creator func(childComplexity int) int @@ -110,6 +141,13 @@ type ComplexityRoot struct { URL func(childComplexity int) int } + F struct { + Datasource func(childComplexity int) int + Md5 func(childComplexity int) int + Path func(childComplexity int) int + Time func(childComplexity int) int + } + KnowledgeBase struct { Annotations func(childComplexity int) int Creator func(childComplexity int) int @@ -161,11 +199,13 @@ type ComplexityRoot struct { } Mutation struct { - Datasource func(childComplexity int) int - Embedder func(childComplexity int) int - Hello func(childComplexity int, name string) int - KnowledgeBase func(childComplexity int) int - Model func(childComplexity int) int + Dataset func(childComplexity int) int + Datasource func(childComplexity int) int + Embedder func(childComplexity int) int + Hello func(childComplexity int, name string) int + KnowledgeBase func(childComplexity int) int + Model func(childComplexity int) int + VersionedDataset func(childComplexity int) int } Oss struct { @@ -182,11 +222,13 @@ type ComplexityRoot struct { } Query struct { - Datasource func(childComplexity int) int - Embedder func(childComplexity int) int - Hello func(childComplexity int, name string) int - KnowledgeBase func(childComplexity int) int - Model func(childComplexity int) int + Dataset func(childComplexity int) int + Datasource func(childComplexity int) int + Embedder func(childComplexity int) int + Hello func(childComplexity int, name string) int + KnowledgeBase func(childComplexity int) int + Model func(childComplexity int) int + VersionedDataset func(childComplexity int) int } TypedObjectReference struct { @@ -196,12 +238,51 @@ type ComplexityRoot struct { Namespace func(childComplexity int) int } + VersionedDataset struct { + Annotations func(childComplexity int) int + CreationTimestamp func(childComplexity int) int + Creator func(childComplexity int) int + Dataset func(childComplexity int) int + DisplayName func(childComplexity int) int + FileCount func(childComplexity int) int + Files func(childComplexity int, input *FileFilter) int + Labels func(childComplexity int) int + Name func(childComplexity int) int + Namespace func(childComplexity int) int + Released func(childComplexity int) int + UpdateTimestamp func(childComplexity int) int + Version func(childComplexity int) int + } + + VersionedDatasetMutation struct { + CreateVersionedDataset func(childComplexity int, input CreateVersionedDatasetInput) int + DeleteVersionedDatasets func(childComplexity int, input DeleteVersionedDatasetInput) int + UpdateVersionedDataset func(childComplexity int, input UpdateVersionedDatasetInput) int + } + + VersionedDatasetQuery struct { + GetVersionedDataset func(childComplexity int, name string, namespace string) int + ListVersionedDatasets func(childComplexity int, input ListVersionedDatasetInput) int + } + Filegroup struct { Path func(childComplexity int) int Source func(childComplexity int) int } } +type DatasetResolver interface { + Versions(ctx context.Context, obj *Dataset, input ListVersionedDatasetInput) (*PaginatedResult, error) +} +type DatasetMutationResolver interface { + CreateDataset(ctx context.Context, obj *DatasetMutation, input *CreateDatasetInput) (*Dataset, error) + UpdateDataset(ctx context.Context, obj *DatasetMutation, input *UpdateDatasetInput) (*Dataset, error) + DeleteDatasets(ctx context.Context, obj *DatasetMutation, input *DeleteDatasetInput) (*string, error) +} +type DatasetQueryResolver interface { + GetDataset(ctx context.Context, obj *DatasetQuery, name string, namespace string) (*Dataset, error) + ListDatasets(ctx context.Context, obj *DatasetQuery, input *ListDatasetInput) (*PaginatedResult, error) +} type DatasourceMutationResolver interface { CreateDatasource(ctx context.Context, obj *DatasourceMutation, input CreateDatasourceInput) (*Datasource, error) UpdateDatasource(ctx context.Context, obj *DatasourceMutation, input *UpdateDatasourceInput) (*Datasource, error) @@ -240,17 +321,33 @@ type ModelQueryResolver interface { } type MutationResolver interface { Hello(ctx context.Context, name string) (string, error) + Dataset(ctx context.Context) (*DatasetMutation, error) Datasource(ctx context.Context) (*DatasourceMutation, error) Embedder(ctx context.Context) (*EmbedderMutation, error) KnowledgeBase(ctx context.Context) (*KnowledgeBaseMutation, error) Model(ctx context.Context) (*ModelMutation, error) + VersionedDataset(ctx context.Context) (*VersionedDatasetMutation, error) } type QueryResolver interface { Hello(ctx context.Context, name string) (string, error) + Dataset(ctx context.Context) (*DatasetQuery, error) Datasource(ctx context.Context) (*DatasourceQuery, error) Embedder(ctx context.Context) (*EmbedderQuery, error) KnowledgeBase(ctx context.Context) (*KnowledgeBaseQuery, error) Model(ctx context.Context) (*ModelQuery, error) + VersionedDataset(ctx context.Context) (*VersionedDatasetQuery, error) +} +type VersionedDatasetResolver interface { + Files(ctx context.Context, obj *VersionedDataset, input *FileFilter) (*PaginatedResult, error) +} +type VersionedDatasetMutationResolver interface { + CreateVersionedDataset(ctx context.Context, obj *VersionedDatasetMutation, input CreateVersionedDatasetInput) (*VersionedDataset, error) + UpdateVersionedDataset(ctx context.Context, obj *VersionedDatasetMutation, input UpdateVersionedDatasetInput) (*VersionedDataset, error) + DeleteVersionedDatasets(ctx context.Context, obj *VersionedDatasetMutation, input DeleteVersionedDatasetInput) (*string, error) +} +type VersionedDatasetQueryResolver interface { + GetVersionedDataset(ctx context.Context, obj *VersionedDatasetQuery, name string, namespace string) (*VersionedDataset, error) + ListVersionedDatasets(ctx context.Context, obj *VersionedDatasetQuery, input ListVersionedDatasetInput) (*PaginatedResult, error) } type executableSchema struct { @@ -272,6 +369,148 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in _ = ec switch typeName + "." + field { + case "Dataset.annotations": + if e.complexity.Dataset.Annotations == nil { + break + } + + return e.complexity.Dataset.Annotations(childComplexity), true + + case "Dataset.contentType": + if e.complexity.Dataset.ContentType == nil { + break + } + + return e.complexity.Dataset.ContentType(childComplexity), true + + case "Dataset.creator": + if e.complexity.Dataset.Creator == nil { + break + } + + return e.complexity.Dataset.Creator(childComplexity), true + + case "Dataset.displayName": + if e.complexity.Dataset.DisplayName == nil { + break + } + + return e.complexity.Dataset.DisplayName(childComplexity), true + + case "Dataset.field": + if e.complexity.Dataset.Field == nil { + break + } + + return e.complexity.Dataset.Field(childComplexity), true + + case "Dataset.labels": + if e.complexity.Dataset.Labels == nil { + break + } + + return e.complexity.Dataset.Labels(childComplexity), true + + case "Dataset.name": + if e.complexity.Dataset.Name == nil { + break + } + + return e.complexity.Dataset.Name(childComplexity), true + + case "Dataset.namespace": + if e.complexity.Dataset.Namespace == nil { + break + } + + return e.complexity.Dataset.Namespace(childComplexity), true + + case "Dataset.updateTimestamp": + if e.complexity.Dataset.UpdateTimestamp == nil { + break + } + + return e.complexity.Dataset.UpdateTimestamp(childComplexity), true + + case "Dataset.versionCount": + if e.complexity.Dataset.VersionCount == nil { + break + } + + return e.complexity.Dataset.VersionCount(childComplexity), true + + case "Dataset.versions": + if e.complexity.Dataset.Versions == nil { + break + } + + args, err := ec.field_Dataset_versions_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.Dataset.Versions(childComplexity, args["input"].(ListVersionedDatasetInput)), true + + case "DatasetMutation.createDataset": + if e.complexity.DatasetMutation.CreateDataset == nil { + break + } + + args, err := ec.field_DatasetMutation_createDataset_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.DatasetMutation.CreateDataset(childComplexity, args["input"].(*CreateDatasetInput)), true + + case "DatasetMutation.deleteDatasets": + if e.complexity.DatasetMutation.DeleteDatasets == nil { + break + } + + args, err := ec.field_DatasetMutation_deleteDatasets_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.DatasetMutation.DeleteDatasets(childComplexity, args["input"].(*DeleteDatasetInput)), true + + case "DatasetMutation.updateDataset": + if e.complexity.DatasetMutation.UpdateDataset == nil { + break + } + + args, err := ec.field_DatasetMutation_updateDataset_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.DatasetMutation.UpdateDataset(childComplexity, args["input"].(*UpdateDatasetInput)), true + + case "DatasetQuery.getDataset": + if e.complexity.DatasetQuery.GetDataset == nil { + break + } + + args, err := ec.field_DatasetQuery_getDataset_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.DatasetQuery.GetDataset(childComplexity, args["name"].(string), args["namespace"].(string)), true + + case "DatasetQuery.listDatasets": + if e.complexity.DatasetQuery.ListDatasets == nil { + break + } + + args, err := ec.field_DatasetQuery_listDatasets_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.DatasetQuery.ListDatasets(childComplexity, args["input"].(*ListDatasetInput)), true + case "Datasource.annotations": if e.complexity.Datasource.Annotations == nil { break @@ -567,6 +806,34 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Endpoint.URL(childComplexity), true + case "F.datasource": + if e.complexity.F.Datasource == nil { + break + } + + return e.complexity.F.Datasource(childComplexity), true + + case "F.md5": + if e.complexity.F.Md5 == nil { + break + } + + return e.complexity.F.Md5(childComplexity), true + + case "F.path": + if e.complexity.F.Path == nil { + break + } + + return e.complexity.F.Path(childComplexity), true + + case "F.time": + if e.complexity.F.Time == nil { + break + } + + return e.complexity.F.Time(childComplexity), true + case "KnowledgeBase.annotations": if e.complexity.KnowledgeBase.Annotations == nil { break @@ -841,6 +1108,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.ModelQuery.ListModels(childComplexity, args["input"].(ListModelInput)), true + case "Mutation.Dataset": + if e.complexity.Mutation.Dataset == nil { + break + } + + return e.complexity.Mutation.Dataset(childComplexity), true + case "Mutation.Datasource": if e.complexity.Mutation.Datasource == nil { break @@ -881,6 +1155,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Mutation.Model(childComplexity), true + case "Mutation.VersionedDataset": + if e.complexity.Mutation.VersionedDataset == nil { + break + } + + return e.complexity.Mutation.VersionedDataset(childComplexity), true + case "Oss.bucket": if e.complexity.Oss.Bucket == nil { break @@ -930,6 +1211,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.PaginatedResult.TotalCount(childComplexity), true + case "Query.Dataset": + if e.complexity.Query.Dataset == nil { + break + } + + return e.complexity.Query.Dataset(childComplexity), true + case "Query.Datasource": if e.complexity.Query.Datasource == nil { break @@ -970,6 +1258,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.Query.Model(childComplexity), true + case "Query.VersionedDataset": + if e.complexity.Query.VersionedDataset == nil { + break + } + + return e.complexity.Query.VersionedDataset(childComplexity), true + case "TypedObjectReference.apiGroup": if e.complexity.TypedObjectReference.APIGroup == nil { break @@ -998,6 +1293,162 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in return e.complexity.TypedObjectReference.Namespace(childComplexity), true + case "VersionedDataset.annotations": + if e.complexity.VersionedDataset.Annotations == nil { + break + } + + return e.complexity.VersionedDataset.Annotations(childComplexity), true + + case "VersionedDataset.creationTimestamp": + if e.complexity.VersionedDataset.CreationTimestamp == nil { + break + } + + return e.complexity.VersionedDataset.CreationTimestamp(childComplexity), true + + case "VersionedDataset.creator": + if e.complexity.VersionedDataset.Creator == nil { + break + } + + return e.complexity.VersionedDataset.Creator(childComplexity), true + + case "VersionedDataset.dataset": + if e.complexity.VersionedDataset.Dataset == nil { + break + } + + return e.complexity.VersionedDataset.Dataset(childComplexity), true + + case "VersionedDataset.displayName": + if e.complexity.VersionedDataset.DisplayName == nil { + break + } + + return e.complexity.VersionedDataset.DisplayName(childComplexity), true + + case "VersionedDataset.fileCount": + if e.complexity.VersionedDataset.FileCount == nil { + break + } + + return e.complexity.VersionedDataset.FileCount(childComplexity), true + + case "VersionedDataset.files": + if e.complexity.VersionedDataset.Files == nil { + break + } + + args, err := ec.field_VersionedDataset_files_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.VersionedDataset.Files(childComplexity, args["input"].(*FileFilter)), true + + case "VersionedDataset.labels": + if e.complexity.VersionedDataset.Labels == nil { + break + } + + return e.complexity.VersionedDataset.Labels(childComplexity), true + + case "VersionedDataset.name": + if e.complexity.VersionedDataset.Name == nil { + break + } + + return e.complexity.VersionedDataset.Name(childComplexity), true + + case "VersionedDataset.namespace": + if e.complexity.VersionedDataset.Namespace == nil { + break + } + + return e.complexity.VersionedDataset.Namespace(childComplexity), true + + case "VersionedDataset.released": + if e.complexity.VersionedDataset.Released == nil { + break + } + + return e.complexity.VersionedDataset.Released(childComplexity), true + + case "VersionedDataset.updateTimestamp": + if e.complexity.VersionedDataset.UpdateTimestamp == nil { + break + } + + return e.complexity.VersionedDataset.UpdateTimestamp(childComplexity), true + + case "VersionedDataset.version": + if e.complexity.VersionedDataset.Version == nil { + break + } + + return e.complexity.VersionedDataset.Version(childComplexity), true + + case "VersionedDatasetMutation.createVersionedDataset": + if e.complexity.VersionedDatasetMutation.CreateVersionedDataset == nil { + break + } + + args, err := ec.field_VersionedDatasetMutation_createVersionedDataset_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.VersionedDatasetMutation.CreateVersionedDataset(childComplexity, args["input"].(CreateVersionedDatasetInput)), true + + case "VersionedDatasetMutation.deleteVersionedDatasets": + if e.complexity.VersionedDatasetMutation.DeleteVersionedDatasets == nil { + break + } + + args, err := ec.field_VersionedDatasetMutation_deleteVersionedDatasets_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.VersionedDatasetMutation.DeleteVersionedDatasets(childComplexity, args["input"].(DeleteVersionedDatasetInput)), true + + case "VersionedDatasetMutation.updateVersionedDataset": + if e.complexity.VersionedDatasetMutation.UpdateVersionedDataset == nil { + break + } + + args, err := ec.field_VersionedDatasetMutation_updateVersionedDataset_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.VersionedDatasetMutation.UpdateVersionedDataset(childComplexity, args["input"].(UpdateVersionedDatasetInput)), true + + case "VersionedDatasetQuery.getVersionedDataset": + if e.complexity.VersionedDatasetQuery.GetVersionedDataset == nil { + break + } + + args, err := ec.field_VersionedDatasetQuery_getVersionedDataset_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.VersionedDatasetQuery.GetVersionedDataset(childComplexity, args["name"].(string), args["namespace"].(string)), true + + case "VersionedDatasetQuery.listVersionedDatasets": + if e.complexity.VersionedDatasetQuery.ListVersionedDatasets == nil { + break + } + + args, err := ec.field_VersionedDatasetQuery_listVersionedDatasets_args(context.TODO(), rawArgs) + if err != nil { + return 0, false + } + + return e.complexity.VersionedDatasetQuery.ListVersionedDatasets(childComplexity, args["input"].(ListVersionedDatasetInput)), true + case "filegroup.path": if e.complexity.Filegroup.Path == nil { break @@ -1020,25 +1471,35 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler { rc := graphql.GetOperationContext(ctx) ec := executionContext{rc, e, 0, 0, make(chan graphql.DeferredResult)} inputUnmarshalMap := graphql.BuildUnmarshalerMap( + ec.unmarshalInputCreateDatasetInput, ec.unmarshalInputCreateDatasourceInput, ec.unmarshalInputCreateEmbedderInput, ec.unmarshalInputCreateKnowledgeBaseInput, ec.unmarshalInputCreateModelInput, + ec.unmarshalInputCreateVersionedDatasetInput, + ec.unmarshalInputDeleteDatasetInput, ec.unmarshalInputDeleteDatasourceInput, ec.unmarshalInputDeleteEmbedderInput, ec.unmarshalInputDeleteKnowledgeBaseInput, ec.unmarshalInputDeleteModelInput, + ec.unmarshalInputDeleteVersionedDatasetInput, ec.unmarshalInputEndpointInput, + ec.unmarshalInputFileFilter, + ec.unmarshalInputFileGroup, + ec.unmarshalInputListDatasetInput, ec.unmarshalInputListDatasourceInput, ec.unmarshalInputListEmbedderInput, ec.unmarshalInputListKnowledgeBaseInput, ec.unmarshalInputListModelInput, + ec.unmarshalInputListVersionedDatasetInput, ec.unmarshalInputOssInput, ec.unmarshalInputTypedObjectReferenceInput, + ec.unmarshalInputUpdateDatasetInput, ec.unmarshalInputUpdateDatasourceInput, ec.unmarshalInputUpdateEmbedderInput, ec.unmarshalInputUpdateKnowledgeBaseInput, ec.unmarshalInputUpdateModelInput, + ec.unmarshalInputUpdateVersionedDatasetInput, ec.unmarshalInputfilegroupinput, ) first := true @@ -1137,18 +1598,173 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er } var sources = []*ast.Source{ - {Name: "../schema/datasource.graphqls", Input: `type Endpoint { - url: String - authSecret: TypedObjectReference - insecure: Boolean -} + {Name: "../schema/dataset.graphqls", Input: `""" +Dataset +数据集代表用户纳管的一组相似属性的文件,采用相同的方式进行数据处理并用于后续的 +1. 模型训练 +2. 知识库 + +支持多种类型数据: +- 文本 +- 图片 +- 视频 + +单个数据集仅允许包含同一类型文件,不同类型文件将被忽略 +数据集允许有多个版本,数据处理针对单个版本进行 +数据集某个版本完成数据处理后,数据处理服务需要将处理后的存储回 版本数据集 +""" +type Dataset { + """数据集名称""" + name: String! -type Oss { - bucket: String - Object: String -} + """数据集所在的namespace,也是后续桶的名字""" + namespace: String! -type Datasource { + """一些用于标记,选择的的标签""" + labels: Map + + """添加一些辅助性记录信息""" + annotations: Map + + """创建者,正查给你这个字段是不需要人写的,自动添加""" + creator: String + + """展示名字, 与metadat.name不一样,这个展示名字是可以用中文的""" + displayName: String! + + """更新时间, 这里更新指文件同步,或者数据处理完成后,做的更新操作的时间""" + updateTimestamp: Time + + """数据集类型,文本,图片,视频""" + contentType: String! + + """应用场景""" + field: String + + """ + 这个是一个resolver,数据集下面的版本列表。 + 支持对名字,类型的完全匹配过滤。 + 支持通过标签(somelabel=abc),字段(metadata.name=abc)进行过滤 + """ + versions(input: ListVersionedDatasetInput!): PaginatedResult! + + """数据集的总版本数量""" + versionCount: Int! +} + +input CreateDatasetInput { + """数据集的CR名字,要满足k8s的名称规则""" + name: String! + + namespace: String! + + """一些标签选择信息,可以不添加""" + labels: Map + + """一些备注用的注视信息,或者记录一个简单的配置""" + annotations: Map + + """展示名称,用于展示在界面上的,必须填写""" + displayName: String! + + """描述信息,可以不写""" + description: String + + """数据集里面的数据的类型,文本,视频,图片""" + contentType: String! + + """应用场景,可以为空""" + filed: String +} + +input UpdateDatasetInput { + """ + name, namespace用来确定资源,不允许修改的。将原数据传递回来即可。 + """ + name: String! + namespace: String! + + """ + 更新的的标签信息,这里涉及到增加或者删除标签, + 所以,如果标签有任何改动,传递完整的label。 + 例如之前的标齐是: abc:def 新增一个标签aa:bb, 那么传递 abc:def, aa:bb + """ + labels: Map + annotations: Map + + """如果不更新,为空就可以""" + displayName: String + + """同理""" + description: String +} + +input DeleteDatasetInput { + name: String + namespace: String! + labelSelector: String + fieldSelector: String +} + +input ListDatasetInput { + name: String + namespace: String! + displayName: String + labelSelector: String + fieldSelector: String + + """分页页码,从1开始,默认是1""" + page: Int + + """每页数量,默认10""" + pageSize: Int + keyword: String +} + +type DatasetQuery { + """根据名字获取某个具体的数据集""" + getDataset(name: String!, namespace: String!): Dataset! + + """ + 获取数据集列表,支持通过标签和字段进行选择。 + labelSelector: aa=bbb + fieldSelector= metadata.name=somename + """ + listDatasets(input: ListDatasetInput): PaginatedResult! +} + +type DatasetMutation { + createDataset(input: CreateDatasetInput): Dataset! + updateDataset(input: UpdateDatasetInput): Dataset! + + """ + 删除数据集 + 可以提供一个名称列表,会将所有名字在这个列表的dataset全部删除 + 支持通过标签进行删除,提供一个标签选择器,将满足标签的dataset全部删除 + 如果提供了这两个参数,以名字列表为主。 + """ + deleteDatasets(input: DeleteDatasetInput): Void +} + +extend type Query { + Dataset: DatasetQuery +} + +extend type Mutation { + Dataset: DatasetMutation +}`, BuiltIn: false}, + {Name: "../schema/datasource.graphqls", Input: `type Endpoint { + url: String + authSecret: TypedObjectReference + insecure: Boolean +} + +type Oss { + bucket: String + Object: String +} + +type Datasource { name: String! namespace: String! labels: Map @@ -1375,7 +1991,7 @@ type TypedObjectReference { Namespace: String } -union PageNode = Datasource | Model | Embedder | KnowledgeBase +union PageNode = Datasource | Model | Embedder | KnowledgeBase | Dataset | VersionedDataset | F `, BuiltIn: false}, {Name: "../schema/knowledgebase.graphqls", Input: `type filegroup{ source: TypedObjectReference @@ -1567,6 +2183,196 @@ extend type Mutation { extend type Query { Model: ModelQuery }`, BuiltIn: false}, + {Name: "../schema/versioned_dataset.graphqls", Input: `""" +VersionedDataset +数据集的版本信息。 +主要记录版本名字,数据的来源,以及文件的同步状态 +""" +type VersionedDataset { + """数据集名称, 这个应该是前端随机生成就可以,没有实际用途""" + name: String! + + """数据集所在的namespace,也是后续桶的名字""" + namespace: String! + + """一些用于标记,选择的的标签""" + labels: Map + + """添加一些辅助性记录信息""" + annotations: Map + + """创建者,正查给你这个字段是不需要人写的,自动添加""" + creator: String + + """展示名字, 与metadat.name不一样,这个展示名字是可以用中文的""" + displayName: String! + + """所属的数据集""" + dataset: TypedObjectReference! + + """更新时间, 这里更新指文件同步,或者数据处理完成后,做的更新操作的时间""" + updateTimestamp: Time + creationTimestamp: Time! + + """数据集所包含的文件,对于文件需要支持过滤和分页""" + files(input: FileFilter): PaginatedResult! + + + """版本名称""" + version: String! + + """该数据集版本所包含的数据总量""" + fileCount: Int! + + """该版本是否已经发布, 0是未发布,1是已经发布""" + released: Int! +} + +""" +File +展示某个版本的所有文件。 +""" +type F { + """文件名称""" + datasource: TypedObjectReference! + + "文件在数据源中的路径,a/b/c.txt或者d.txt" + path: String! + + """摘要?摘啥""" + md5: String + + """文件成功导入时间,如果没有导入成功,这个字段为空""" + time: Time +} + +""" +根据条件顾虑版本内的文件,只支持关键词搜索 +""" +input FileFilter { + """根据关键词搜索文件,strings.Container(fileName, keyword)""" + keyword: String! + + """页""" + page: Int! + + """页内容数量""" + pageSize: Int! + + """根据文件名字或者更新时间排序, file, time""" + sortBy: String +} + +input FileGroup { + """数据源的基础信息""" + datasource: TypedObjectReferenceInput! + + """用到的文件路径,注意⚠️ 一定不要加bucket的名字""" + paths: [String!] +} + + +input CreateVersionedDatasetInput { + """数据集的CR名字,要满足k8s的名称规则""" + name: String! + + namespace: String! + + """dataset的名字,需要根据这个名字, + 判断是否最新版本不包含任何文件(产品要求,有一个不包含任何文件的版本,不允许创建新的版本) + """ + datasetName: String! + + """一些标签选择信息,可以不添加""" + labels: Map + + """一些备注用的注视信息,或者记录一个简单的配置""" + annotations: Map + + """展示名称,用于展示在界面上的,必须填写""" + displayName: String! + + """描述信息,可以不写""" + description: String + + """数据集里面的数据的类型,文本,视频,图片""" + version: String! + + """是否发布,0是未发布,1是已经发布,创建一个版本的时候默认传递0就可以""" + release: Int! + + fileGrups: [FileGroup] +} + +input UpdateVersionedDatasetInput { + """ + 这个名字就是metadat.name, 根据name和namespace确定资源 + name,namespac是不可以更新的。 + """ + name: String! + namespace: String! + + """ + 更新的的标签信息,这里涉及到增加或者删除标签, + 所以,如果标签有任何改动,传递完整的label。 + 例如之前的标齐是: abc:def 新增一个标签aa:bb, 那么传递 abc:def, aa:bb + """ + labels: Map + + """传递方式同label""" + annotations: Map + + displayName: String! + description: String + + """ + 更新,删除数据集版本中的文件,传递方式于label相同,完全传递。 + 如果传递一个空的数组过去,认为是删除全部文件。 + """ + fileGroups: [FileGroup!] +} + + +input DeleteVersionedDatasetInput { + name: String + namespace: String! + labelSelector: String + fieldSelector: String +} + +input ListVersionedDatasetInput { + name: String + namespace: String! + displayName: String + labelSelector: String + fieldSelector: String + + """分页页码,从1开始,默认是1""" + page: Int + + """每页数量,默认10""" + pageSize: Int + keyword: String +} + +type VersionedDatasetQuery { + getVersionedDataset(name: String!, namespace: String!): VersionedDataset! + listVersionedDatasets(input: ListVersionedDatasetInput!): PaginatedResult! +} +type VersionedDatasetMutation { + createVersionedDataset(input: CreateVersionedDatasetInput!): VersionedDataset! + updateVersionedDataset(input: UpdateVersionedDatasetInput!): VersionedDataset! + deleteVersionedDatasets(input: DeleteVersionedDatasetInput!): Void +} + +extend type Query { + VersionedDataset: VersionedDatasetQuery +} + +extend type Mutation { + VersionedDataset: VersionedDatasetMutation +} +`, BuiltIn: false}, } var parsedSchema = gqlparser.MustLoadSchema(sources...) @@ -1574,6 +2380,105 @@ var parsedSchema = gqlparser.MustLoadSchema(sources...) // region ***************************** args.gotpl ***************************** +func (ec *executionContext) field_DatasetMutation_createDataset_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *CreateDatasetInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalOCreateDatasetInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐCreateDatasetInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + +func (ec *executionContext) field_DatasetMutation_deleteDatasets_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *DeleteDatasetInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalODeleteDatasetInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDeleteDatasetInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + +func (ec *executionContext) field_DatasetMutation_updateDataset_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *UpdateDatasetInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalOUpdateDatasetInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐUpdateDatasetInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + +func (ec *executionContext) field_DatasetQuery_getDataset_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg0 + var arg1 string + if tmp, ok := rawArgs["namespace"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["namespace"] = arg1 + return args, nil +} + +func (ec *executionContext) field_DatasetQuery_listDatasets_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *ListDatasetInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalOListDatasetInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐListDatasetInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + +func (ec *executionContext) field_Dataset_versions_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 ListVersionedDatasetInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalNListVersionedDatasetInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐListVersionedDatasetInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + func (ec *executionContext) field_DatasourceMutation_createDatasource_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} @@ -1955,12 +2860,111 @@ func (ec *executionContext) field_Query_hello_args(ctx context.Context, rawArgs return args, nil } -func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { +func (ec *executionContext) field_VersionedDatasetMutation_createVersionedDataset_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { var err error args := map[string]interface{}{} - var arg0 bool - if tmp, ok := rawArgs["includeDeprecated"]; ok { - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) + var arg0 CreateVersionedDatasetInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalNCreateVersionedDatasetInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐCreateVersionedDatasetInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + +func (ec *executionContext) field_VersionedDatasetMutation_deleteVersionedDatasets_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 DeleteVersionedDatasetInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalNDeleteVersionedDatasetInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDeleteVersionedDatasetInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + +func (ec *executionContext) field_VersionedDatasetMutation_updateVersionedDataset_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 UpdateVersionedDatasetInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalNUpdateVersionedDatasetInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐUpdateVersionedDatasetInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + +func (ec *executionContext) field_VersionedDatasetQuery_getVersionedDataset_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 string + if tmp, ok := rawArgs["name"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + arg0, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["name"] = arg0 + var arg1 string + if tmp, ok := rawArgs["namespace"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + arg1, err = ec.unmarshalNString2string(ctx, tmp) + if err != nil { + return nil, err + } + } + args["namespace"] = arg1 + return args, nil +} + +func (ec *executionContext) field_VersionedDatasetQuery_listVersionedDatasets_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 ListVersionedDatasetInput + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalNListVersionedDatasetInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐListVersionedDatasetInput(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + +func (ec *executionContext) field_VersionedDataset_files_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 *FileFilter + if tmp, ok := rawArgs["input"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("input")) + arg0, err = ec.unmarshalOFileFilter2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFileFilter(ctx, tmp) + if err != nil { + return nil, err + } + } + args["input"] = arg0 + return args, nil +} + +func (ec *executionContext) field___Type_enumValues_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) { + var err error + args := map[string]interface{}{} + var arg0 bool + if tmp, ok := rawArgs["includeDeprecated"]; ok { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("includeDeprecated")) arg0, err = ec.unmarshalOBoolean2bool(ctx, tmp) if err != nil { return nil, err @@ -1993,8 +2997,8 @@ func (ec *executionContext) field___Type_fields_args(ctx context.Context, rawArg // region **************************** field.gotpl ***************************** -func (ec *executionContext) _Datasource_name(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_name(ctx, field) +func (ec *executionContext) _Dataset_name(ctx context.Context, field graphql.CollectedField, obj *Dataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Dataset_name(ctx, field) if err != nil { return graphql.Null } @@ -2024,9 +3028,9 @@ func (ec *executionContext) _Datasource_name(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Dataset_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "Dataset", Field: field, IsMethod: false, IsResolver: false, @@ -2037,8 +3041,8 @@ func (ec *executionContext) fieldContext_Datasource_name(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _Datasource_namespace(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_namespace(ctx, field) +func (ec *executionContext) _Dataset_namespace(ctx context.Context, field graphql.CollectedField, obj *Dataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Dataset_namespace(ctx, field) if err != nil { return graphql.Null } @@ -2068,9 +3072,9 @@ func (ec *executionContext) _Datasource_namespace(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Dataset_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "Dataset", Field: field, IsMethod: false, IsResolver: false, @@ -2081,8 +3085,8 @@ func (ec *executionContext) fieldContext_Datasource_namespace(ctx context.Contex return fc, nil } -func (ec *executionContext) _Datasource_labels(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_labels(ctx, field) +func (ec *executionContext) _Dataset_labels(ctx context.Context, field graphql.CollectedField, obj *Dataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Dataset_labels(ctx, field) if err != nil { return graphql.Null } @@ -2109,9 +3113,9 @@ func (ec *executionContext) _Datasource_labels(ctx context.Context, field graphq return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Dataset_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "Dataset", Field: field, IsMethod: false, IsResolver: false, @@ -2122,8 +3126,8 @@ func (ec *executionContext) fieldContext_Datasource_labels(ctx context.Context, return fc, nil } -func (ec *executionContext) _Datasource_annotations(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_annotations(ctx, field) +func (ec *executionContext) _Dataset_annotations(ctx context.Context, field graphql.CollectedField, obj *Dataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Dataset_annotations(ctx, field) if err != nil { return graphql.Null } @@ -2150,9 +3154,9 @@ func (ec *executionContext) _Datasource_annotations(ctx context.Context, field g return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Dataset_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "Dataset", Field: field, IsMethod: false, IsResolver: false, @@ -2163,8 +3167,8 @@ func (ec *executionContext) fieldContext_Datasource_annotations(ctx context.Cont return fc, nil } -func (ec *executionContext) _Datasource_creator(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_creator(ctx, field) +func (ec *executionContext) _Dataset_creator(ctx context.Context, field graphql.CollectedField, obj *Dataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Dataset_creator(ctx, field) if err != nil { return graphql.Null } @@ -2191,9 +3195,9 @@ func (ec *executionContext) _Datasource_creator(ctx context.Context, field graph return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Dataset_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "Dataset", Field: field, IsMethod: false, IsResolver: false, @@ -2204,8 +3208,8 @@ func (ec *executionContext) fieldContext_Datasource_creator(ctx context.Context, return fc, nil } -func (ec *executionContext) _Datasource_displayName(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_displayName(ctx, field) +func (ec *executionContext) _Dataset_displayName(ctx context.Context, field graphql.CollectedField, obj *Dataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Dataset_displayName(ctx, field) if err != nil { return graphql.Null } @@ -2235,9 +3239,9 @@ func (ec *executionContext) _Datasource_displayName(ctx context.Context, field g return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Dataset_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "Dataset", Field: field, IsMethod: false, IsResolver: false, @@ -2248,8 +3252,8 @@ func (ec *executionContext) fieldContext_Datasource_displayName(ctx context.Cont return fc, nil } -func (ec *executionContext) _Datasource_description(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_description(ctx, field) +func (ec *executionContext) _Dataset_updateTimestamp(ctx context.Context, field graphql.CollectedField, obj *Dataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Dataset_updateTimestamp(ctx, field) if err != nil { return graphql.Null } @@ -2262,7 +3266,7 @@ func (ec *executionContext) _Datasource_description(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.UpdateTimestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -2271,26 +3275,26 @@ func (ec *executionContext) _Datasource_description(ctx context.Context, field g if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*time.Time) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Dataset_updateTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "Dataset", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Datasource_endpoint(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_endpoint(ctx, field) +func (ec *executionContext) _Dataset_contentType(ctx context.Context, field graphql.CollectedField, obj *Dataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Dataset_contentType(ctx, field) if err != nil { return graphql.Null } @@ -2303,43 +3307,38 @@ func (ec *executionContext) _Datasource_endpoint(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Endpoint, nil + return obj.ContentType, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*Endpoint) + res := resTmp.(string) fc.Result = res - return ec.marshalOEndpoint2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEndpoint(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_endpoint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Dataset_contentType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "Dataset", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "url": - return ec.fieldContext_Endpoint_url(ctx, field) - case "authSecret": - return ec.fieldContext_Endpoint_authSecret(ctx, field) - case "insecure": - return ec.fieldContext_Endpoint_insecure(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Endpoint", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Datasource_oss(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_oss(ctx, field) +func (ec *executionContext) _Dataset_field(ctx context.Context, field graphql.CollectedField, obj *Dataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Dataset_field(ctx, field) if err != nil { return graphql.Null } @@ -2352,7 +3351,7 @@ func (ec *executionContext) _Datasource_oss(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Oss, nil + return obj.Field, nil }) if err != nil { ec.Error(ctx, err) @@ -2361,32 +3360,26 @@ func (ec *executionContext) _Datasource_oss(ctx context.Context, field graphql.C if resTmp == nil { return graphql.Null } - res := resTmp.(*Oss) + res := resTmp.(*string) fc.Result = res - return ec.marshalOOss2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐOss(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_oss(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Dataset_field(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "Dataset", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "bucket": - return ec.fieldContext_Oss_bucket(ctx, field) - case "Object": - return ec.fieldContext_Oss_Object(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Oss", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Datasource_status(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_status(ctx, field) +func (ec *executionContext) _Dataset_versions(ctx context.Context, field graphql.CollectedField, obj *Dataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Dataset_versions(ctx, field) if err != nil { return graphql.Null } @@ -2399,35 +3392,61 @@ func (ec *executionContext) _Datasource_status(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return ec.resolvers.Dataset().Versions(rctx, obj, fc.Args["input"].(ListVersionedDatasetInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*PaginatedResult) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNPaginatedResult2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPaginatedResult(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Dataset_versions(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "Dataset", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PaginatedResult_hasNextPage(ctx, field) + case "nodes": + return ec.fieldContext_PaginatedResult_nodes(ctx, field) + case "page": + return ec.fieldContext_PaginatedResult_page(ctx, field) + case "pageSize": + return ec.fieldContext_PaginatedResult_pageSize(ctx, field) + case "totalCount": + return ec.fieldContext_PaginatedResult_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PaginatedResult", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Dataset_versions_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Datasource_fileCount(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_fileCount(ctx, field) +func (ec *executionContext) _Dataset_versionCount(ctx context.Context, field graphql.CollectedField, obj *Dataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Dataset_versionCount(ctx, field) if err != nil { return graphql.Null } @@ -2440,23 +3459,26 @@ func (ec *executionContext) _Datasource_fileCount(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.FileCount, nil + return obj.VersionCount, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int) + res := resTmp.(int) fc.Result = res - return ec.marshalOInt2ᚖint(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_fileCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Dataset_versionCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "Dataset", Field: field, IsMethod: false, IsResolver: false, @@ -2467,8 +3489,8 @@ func (ec *executionContext) fieldContext_Datasource_fileCount(ctx context.Contex return fc, nil } -func (ec *executionContext) _Datasource_updateTimestamp(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Datasource_updateTimestamp(ctx, field) +func (ec *executionContext) _DatasetMutation_createDataset(ctx context.Context, field graphql.CollectedField, obj *DatasetMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DatasetMutation_createDataset(ctx, field) if err != nil { return graphql.Null } @@ -2481,7 +3503,7 @@ func (ec *executionContext) _Datasource_updateTimestamp(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdateTimestamp, nil + return ec.resolvers.DatasetMutation().CreateDataset(rctx, obj, fc.Args["input"].(*CreateDatasetInput)) }) if err != nil { ec.Error(ctx, err) @@ -2493,26 +3515,61 @@ func (ec *executionContext) _Datasource_updateTimestamp(ctx context.Context, fie } return graphql.Null } - res := resTmp.(time.Time) + res := resTmp.(*Dataset) fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) + return ec.marshalNDataset2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDataset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Datasource_updateTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DatasetMutation_createDataset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Datasource", + Object: "DatasetMutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + switch field.Name { + case "name": + return ec.fieldContext_Dataset_name(ctx, field) + case "namespace": + return ec.fieldContext_Dataset_namespace(ctx, field) + case "labels": + return ec.fieldContext_Dataset_labels(ctx, field) + case "annotations": + return ec.fieldContext_Dataset_annotations(ctx, field) + case "creator": + return ec.fieldContext_Dataset_creator(ctx, field) + case "displayName": + return ec.fieldContext_Dataset_displayName(ctx, field) + case "updateTimestamp": + return ec.fieldContext_Dataset_updateTimestamp(ctx, field) + case "contentType": + return ec.fieldContext_Dataset_contentType(ctx, field) + case "field": + return ec.fieldContext_Dataset_field(ctx, field) + case "versions": + return ec.fieldContext_Dataset_versions(ctx, field) + case "versionCount": + return ec.fieldContext_Dataset_versionCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Dataset", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_DatasetMutation_createDataset_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _DatasourceMutation_createDatasource(ctx context.Context, field graphql.CollectedField, obj *DatasourceMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DatasourceMutation_createDatasource(ctx, field) +func (ec *executionContext) _DatasetMutation_updateDataset(ctx context.Context, field graphql.CollectedField, obj *DatasetMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DatasetMutation_updateDataset(ctx, field) if err != nil { return graphql.Null } @@ -2525,7 +3582,7 @@ func (ec *executionContext) _DatasourceMutation_createDatasource(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DatasourceMutation().CreateDatasource(rctx, obj, fc.Args["input"].(CreateDatasourceInput)) + return ec.resolvers.DatasetMutation().UpdateDataset(rctx, obj, fc.Args["input"].(*UpdateDatasetInput)) }) if err != nil { ec.Error(ctx, err) @@ -2537,126 +3594,43 @@ func (ec *executionContext) _DatasourceMutation_createDatasource(ctx context.Con } return graphql.Null } - res := resTmp.(*Datasource) + res := resTmp.(*Dataset) fc.Result = res - return ec.marshalNDatasource2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasource(ctx, field.Selections, res) + return ec.marshalNDataset2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDataset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DatasourceMutation_createDatasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DatasetMutation_updateDataset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DatasourceMutation", + Object: "DatasetMutation", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "name": - return ec.fieldContext_Datasource_name(ctx, field) + return ec.fieldContext_Dataset_name(ctx, field) case "namespace": - return ec.fieldContext_Datasource_namespace(ctx, field) + return ec.fieldContext_Dataset_namespace(ctx, field) case "labels": - return ec.fieldContext_Datasource_labels(ctx, field) - case "annotations": - return ec.fieldContext_Datasource_annotations(ctx, field) - case "creator": - return ec.fieldContext_Datasource_creator(ctx, field) - case "displayName": - return ec.fieldContext_Datasource_displayName(ctx, field) - case "description": - return ec.fieldContext_Datasource_description(ctx, field) - case "endpoint": - return ec.fieldContext_Datasource_endpoint(ctx, field) - case "oss": - return ec.fieldContext_Datasource_oss(ctx, field) - case "status": - return ec.fieldContext_Datasource_status(ctx, field) - case "fileCount": - return ec.fieldContext_Datasource_fileCount(ctx, field) - case "updateTimestamp": - return ec.fieldContext_Datasource_updateTimestamp(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Datasource", field.Name) - }, - } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_DatasourceMutation_createDatasource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } - return fc, nil -} - -func (ec *executionContext) _DatasourceMutation_updateDatasource(ctx context.Context, field graphql.CollectedField, obj *DatasourceMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DatasourceMutation_updateDatasource(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null - } - }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return ec.resolvers.DatasourceMutation().UpdateDatasource(rctx, obj, fc.Args["input"].(*UpdateDatasourceInput)) - }) - if err != nil { - ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(*Datasource) - fc.Result = res - return ec.marshalNDatasource2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasource(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_DatasourceMutation_updateDatasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "DatasourceMutation", - Field: field, - IsMethod: true, - IsResolver: true, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_Datasource_name(ctx, field) - case "namespace": - return ec.fieldContext_Datasource_namespace(ctx, field) - case "labels": - return ec.fieldContext_Datasource_labels(ctx, field) + return ec.fieldContext_Dataset_labels(ctx, field) case "annotations": - return ec.fieldContext_Datasource_annotations(ctx, field) + return ec.fieldContext_Dataset_annotations(ctx, field) case "creator": - return ec.fieldContext_Datasource_creator(ctx, field) + return ec.fieldContext_Dataset_creator(ctx, field) case "displayName": - return ec.fieldContext_Datasource_displayName(ctx, field) - case "description": - return ec.fieldContext_Datasource_description(ctx, field) - case "endpoint": - return ec.fieldContext_Datasource_endpoint(ctx, field) - case "oss": - return ec.fieldContext_Datasource_oss(ctx, field) - case "status": - return ec.fieldContext_Datasource_status(ctx, field) - case "fileCount": - return ec.fieldContext_Datasource_fileCount(ctx, field) + return ec.fieldContext_Dataset_displayName(ctx, field) case "updateTimestamp": - return ec.fieldContext_Datasource_updateTimestamp(ctx, field) + return ec.fieldContext_Dataset_updateTimestamp(ctx, field) + case "contentType": + return ec.fieldContext_Dataset_contentType(ctx, field) + case "field": + return ec.fieldContext_Dataset_field(ctx, field) + case "versions": + return ec.fieldContext_Dataset_versions(ctx, field) + case "versionCount": + return ec.fieldContext_Dataset_versionCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Datasource", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Dataset", field.Name) }, } defer func() { @@ -2666,15 +3640,15 @@ func (ec *executionContext) fieldContext_DatasourceMutation_updateDatasource(ctx } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_DatasourceMutation_updateDatasource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_DatasetMutation_updateDataset_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _DatasourceMutation_deleteDatasource(ctx context.Context, field graphql.CollectedField, obj *DatasourceMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DatasourceMutation_deleteDatasource(ctx, field) +func (ec *executionContext) _DatasetMutation_deleteDatasets(ctx context.Context, field graphql.CollectedField, obj *DatasetMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DatasetMutation_deleteDatasets(ctx, field) if err != nil { return graphql.Null } @@ -2687,7 +3661,7 @@ func (ec *executionContext) _DatasourceMutation_deleteDatasource(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DatasourceMutation().DeleteDatasource(rctx, obj, fc.Args["input"].(*DeleteDatasourceInput)) + return ec.resolvers.DatasetMutation().DeleteDatasets(rctx, obj, fc.Args["input"].(*DeleteDatasetInput)) }) if err != nil { ec.Error(ctx, err) @@ -2701,9 +3675,9 @@ func (ec *executionContext) _DatasourceMutation_deleteDatasource(ctx context.Con return ec.marshalOVoid2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DatasourceMutation_deleteDatasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DatasetMutation_deleteDatasets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DatasourceMutation", + Object: "DatasetMutation", Field: field, IsMethod: true, IsResolver: true, @@ -2718,15 +3692,15 @@ func (ec *executionContext) fieldContext_DatasourceMutation_deleteDatasource(ctx } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_DatasourceMutation_deleteDatasource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_DatasetMutation_deleteDatasets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _DatasourceQuery_getDatasource(ctx context.Context, field graphql.CollectedField, obj *DatasourceQuery) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DatasourceQuery_getDatasource(ctx, field) +func (ec *executionContext) _DatasetQuery_getDataset(ctx context.Context, field graphql.CollectedField, obj *DatasetQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DatasetQuery_getDataset(ctx, field) if err != nil { return graphql.Null } @@ -2739,7 +3713,7 @@ func (ec *executionContext) _DatasourceQuery_getDatasource(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DatasourceQuery().GetDatasource(rctx, obj, fc.Args["name"].(string), fc.Args["namespace"].(string)) + return ec.resolvers.DatasetQuery().GetDataset(rctx, obj, fc.Args["name"].(string), fc.Args["namespace"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -2751,45 +3725,43 @@ func (ec *executionContext) _DatasourceQuery_getDatasource(ctx context.Context, } return graphql.Null } - res := resTmp.(*Datasource) + res := resTmp.(*Dataset) fc.Result = res - return ec.marshalNDatasource2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasource(ctx, field.Selections, res) + return ec.marshalNDataset2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDataset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DatasourceQuery_getDatasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DatasetQuery_getDataset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DatasourceQuery", + Object: "DatasetQuery", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "name": - return ec.fieldContext_Datasource_name(ctx, field) + return ec.fieldContext_Dataset_name(ctx, field) case "namespace": - return ec.fieldContext_Datasource_namespace(ctx, field) + return ec.fieldContext_Dataset_namespace(ctx, field) case "labels": - return ec.fieldContext_Datasource_labels(ctx, field) + return ec.fieldContext_Dataset_labels(ctx, field) case "annotations": - return ec.fieldContext_Datasource_annotations(ctx, field) + return ec.fieldContext_Dataset_annotations(ctx, field) case "creator": - return ec.fieldContext_Datasource_creator(ctx, field) + return ec.fieldContext_Dataset_creator(ctx, field) case "displayName": - return ec.fieldContext_Datasource_displayName(ctx, field) - case "description": - return ec.fieldContext_Datasource_description(ctx, field) - case "endpoint": - return ec.fieldContext_Datasource_endpoint(ctx, field) - case "oss": - return ec.fieldContext_Datasource_oss(ctx, field) - case "status": - return ec.fieldContext_Datasource_status(ctx, field) - case "fileCount": - return ec.fieldContext_Datasource_fileCount(ctx, field) + return ec.fieldContext_Dataset_displayName(ctx, field) case "updateTimestamp": - return ec.fieldContext_Datasource_updateTimestamp(ctx, field) + return ec.fieldContext_Dataset_updateTimestamp(ctx, field) + case "contentType": + return ec.fieldContext_Dataset_contentType(ctx, field) + case "field": + return ec.fieldContext_Dataset_field(ctx, field) + case "versions": + return ec.fieldContext_Dataset_versions(ctx, field) + case "versionCount": + return ec.fieldContext_Dataset_versionCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Datasource", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Dataset", field.Name) }, } defer func() { @@ -2799,15 +3771,15 @@ func (ec *executionContext) fieldContext_DatasourceQuery_getDatasource(ctx conte } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_DatasourceQuery_getDatasource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_DatasetQuery_getDataset_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _DatasourceQuery_listDatasources(ctx context.Context, field graphql.CollectedField, obj *DatasourceQuery) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_DatasourceQuery_listDatasources(ctx, field) +func (ec *executionContext) _DatasetQuery_listDatasets(ctx context.Context, field graphql.CollectedField, obj *DatasetQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DatasetQuery_listDatasets(ctx, field) if err != nil { return graphql.Null } @@ -2820,7 +3792,7 @@ func (ec *executionContext) _DatasourceQuery_listDatasources(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.DatasourceQuery().ListDatasources(rctx, obj, fc.Args["input"].(ListDatasourceInput)) + return ec.resolvers.DatasetQuery().ListDatasets(rctx, obj, fc.Args["input"].(*ListDatasetInput)) }) if err != nil { ec.Error(ctx, err) @@ -2837,9 +3809,9 @@ func (ec *executionContext) _DatasourceQuery_listDatasources(ctx context.Context return ec.marshalNPaginatedResult2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPaginatedResult(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_DatasourceQuery_listDatasources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DatasetQuery_listDatasets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "DatasourceQuery", + Object: "DatasetQuery", Field: field, IsMethod: true, IsResolver: true, @@ -2866,15 +3838,15 @@ func (ec *executionContext) fieldContext_DatasourceQuery_listDatasources(ctx con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_DatasourceQuery_listDatasources_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_DatasetQuery_listDatasets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Embedder_name(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Embedder_name(ctx, field) +func (ec *executionContext) _Datasource_name(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_name(ctx, field) if err != nil { return graphql.Null } @@ -2904,9 +3876,9 @@ func (ec *executionContext) _Embedder_name(ctx context.Context, field graphql.Co return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Embedder_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Datasource_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Embedder", + Object: "Datasource", Field: field, IsMethod: false, IsResolver: false, @@ -2917,8 +3889,8 @@ func (ec *executionContext) fieldContext_Embedder_name(ctx context.Context, fiel return fc, nil } -func (ec *executionContext) _Embedder_namespace(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Embedder_namespace(ctx, field) +func (ec *executionContext) _Datasource_namespace(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_namespace(ctx, field) if err != nil { return graphql.Null } @@ -2948,9 +3920,9 @@ func (ec *executionContext) _Embedder_namespace(ctx context.Context, field graph return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Embedder_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Datasource_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Embedder", + Object: "Datasource", Field: field, IsMethod: false, IsResolver: false, @@ -2961,8 +3933,8 @@ func (ec *executionContext) fieldContext_Embedder_namespace(ctx context.Context, return fc, nil } -func (ec *executionContext) _Embedder_labels(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Embedder_labels(ctx, field) +func (ec *executionContext) _Datasource_labels(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_labels(ctx, field) if err != nil { return graphql.Null } @@ -2989,9 +3961,9 @@ func (ec *executionContext) _Embedder_labels(ctx context.Context, field graphql. return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Embedder_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Datasource_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Embedder", + Object: "Datasource", Field: field, IsMethod: false, IsResolver: false, @@ -3002,8 +3974,8 @@ func (ec *executionContext) fieldContext_Embedder_labels(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _Embedder_annotations(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Embedder_annotations(ctx, field) +func (ec *executionContext) _Datasource_annotations(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_annotations(ctx, field) if err != nil { return graphql.Null } @@ -3030,9 +4002,9 @@ func (ec *executionContext) _Embedder_annotations(ctx context.Context, field gra return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Embedder_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Datasource_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Embedder", + Object: "Datasource", Field: field, IsMethod: false, IsResolver: false, @@ -3043,8 +4015,8 @@ func (ec *executionContext) fieldContext_Embedder_annotations(ctx context.Contex return fc, nil } -func (ec *executionContext) _Embedder_creator(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Embedder_creator(ctx, field) +func (ec *executionContext) _Datasource_creator(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_creator(ctx, field) if err != nil { return graphql.Null } @@ -3071,9 +4043,9 @@ func (ec *executionContext) _Embedder_creator(ctx context.Context, field graphql return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Embedder_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Datasource_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Embedder", + Object: "Datasource", Field: field, IsMethod: false, IsResolver: false, @@ -3084,8 +4056,8 @@ func (ec *executionContext) fieldContext_Embedder_creator(ctx context.Context, f return fc, nil } -func (ec *executionContext) _Embedder_displayName(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Embedder_displayName(ctx, field) +func (ec *executionContext) _Datasource_displayName(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_displayName(ctx, field) if err != nil { return graphql.Null } @@ -3115,9 +4087,9 @@ func (ec *executionContext) _Embedder_displayName(ctx context.Context, field gra return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Embedder_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Datasource_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Embedder", + Object: "Datasource", Field: field, IsMethod: false, IsResolver: false, @@ -3128,8 +4100,8 @@ func (ec *executionContext) fieldContext_Embedder_displayName(ctx context.Contex return fc, nil } -func (ec *executionContext) _Embedder_description(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Embedder_description(ctx, field) +func (ec *executionContext) _Datasource_description(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_description(ctx, field) if err != nil { return graphql.Null } @@ -3156,9 +4128,9 @@ func (ec *executionContext) _Embedder_description(ctx context.Context, field gra return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Embedder_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Datasource_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Embedder", + Object: "Datasource", Field: field, IsMethod: false, IsResolver: false, @@ -3169,8 +4141,8 @@ func (ec *executionContext) fieldContext_Embedder_description(ctx context.Contex return fc, nil } -func (ec *executionContext) _Embedder_endpoint(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Embedder_endpoint(ctx, field) +func (ec *executionContext) _Datasource_endpoint(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_endpoint(ctx, field) if err != nil { return graphql.Null } @@ -3197,9 +4169,9 @@ func (ec *executionContext) _Embedder_endpoint(ctx context.Context, field graphq return ec.marshalOEndpoint2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEndpoint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Embedder_endpoint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Datasource_endpoint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Embedder", + Object: "Datasource", Field: field, IsMethod: false, IsResolver: false, @@ -3218,8 +4190,8 @@ func (ec *executionContext) fieldContext_Embedder_endpoint(ctx context.Context, return fc, nil } -func (ec *executionContext) _Embedder_serviceType(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Embedder_serviceType(ctx, field) +func (ec *executionContext) _Datasource_oss(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_oss(ctx, field) if err != nil { return graphql.Null } @@ -3232,7 +4204,7 @@ func (ec *executionContext) _Embedder_serviceType(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.ServiceType, nil + return obj.Oss, nil }) if err != nil { ec.Error(ctx, err) @@ -3241,26 +4213,32 @@ func (ec *executionContext) _Embedder_serviceType(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*Oss) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOOss2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐOss(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Embedder_serviceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Datasource_oss(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Embedder", + Object: "Datasource", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "bucket": + return ec.fieldContext_Oss_bucket(ctx, field) + case "Object": + return ec.fieldContext_Oss_Object(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Oss", field.Name) }, } return fc, nil } -func (ec *executionContext) _Embedder_updateTimestamp(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Embedder_updateTimestamp(ctx, field) +func (ec *executionContext) _Datasource_status(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_status(ctx, field) if err != nil { return graphql.Null } @@ -3273,7 +4251,7 @@ func (ec *executionContext) _Embedder_updateTimestamp(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdateTimestamp, nil + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) @@ -3282,26 +4260,26 @@ func (ec *executionContext) _Embedder_updateTimestamp(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*time.Time) + res := resTmp.(*string) fc.Result = res - return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Embedder_updateTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Datasource_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Embedder", + Object: "Datasource", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _EmbedderMutation_createEmbedder(ctx context.Context, field graphql.CollectedField, obj *EmbedderMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EmbedderMutation_createEmbedder(ctx, field) +func (ec *executionContext) _Datasource_fileCount(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_fileCount(ctx, field) if err != nil { return graphql.Null } @@ -3314,53 +4292,142 @@ func (ec *executionContext) _EmbedderMutation_createEmbedder(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EmbedderMutation().CreateEmbedder(rctx, obj, fc.Args["input"].(CreateEmbedderInput)) + return obj.FileCount, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*Embedder) + res := resTmp.(*int) fc.Result = res - return ec.marshalNEmbedder2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEmbedder(ctx, field.Selections, res) + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EmbedderMutation_createEmbedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Datasource_fileCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EmbedderMutation", + Object: "Datasource", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Int does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _Datasource_updateTimestamp(ctx context.Context, field graphql.CollectedField, obj *Datasource) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Datasource_updateTimestamp(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.UpdateTimestamp, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(time.Time) + fc.Result = res + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Datasource_updateTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Datasource", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Time does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _DatasourceMutation_createDatasource(ctx context.Context, field graphql.CollectedField, obj *DatasourceMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DatasourceMutation_createDatasource(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.DatasourceMutation().CreateDatasource(rctx, obj, fc.Args["input"].(CreateDatasourceInput)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*Datasource) + fc.Result = res + return ec.marshalNDatasource2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasource(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_DatasourceMutation_createDatasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "DatasourceMutation", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "name": - return ec.fieldContext_Embedder_name(ctx, field) + return ec.fieldContext_Datasource_name(ctx, field) case "namespace": - return ec.fieldContext_Embedder_namespace(ctx, field) + return ec.fieldContext_Datasource_namespace(ctx, field) case "labels": - return ec.fieldContext_Embedder_labels(ctx, field) + return ec.fieldContext_Datasource_labels(ctx, field) case "annotations": - return ec.fieldContext_Embedder_annotations(ctx, field) + return ec.fieldContext_Datasource_annotations(ctx, field) case "creator": - return ec.fieldContext_Embedder_creator(ctx, field) + return ec.fieldContext_Datasource_creator(ctx, field) case "displayName": - return ec.fieldContext_Embedder_displayName(ctx, field) + return ec.fieldContext_Datasource_displayName(ctx, field) case "description": - return ec.fieldContext_Embedder_description(ctx, field) + return ec.fieldContext_Datasource_description(ctx, field) case "endpoint": - return ec.fieldContext_Embedder_endpoint(ctx, field) - case "serviceType": - return ec.fieldContext_Embedder_serviceType(ctx, field) + return ec.fieldContext_Datasource_endpoint(ctx, field) + case "oss": + return ec.fieldContext_Datasource_oss(ctx, field) + case "status": + return ec.fieldContext_Datasource_status(ctx, field) + case "fileCount": + return ec.fieldContext_Datasource_fileCount(ctx, field) case "updateTimestamp": - return ec.fieldContext_Embedder_updateTimestamp(ctx, field) + return ec.fieldContext_Datasource_updateTimestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Embedder", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Datasource", field.Name) }, } defer func() { @@ -3370,15 +4437,15 @@ func (ec *executionContext) fieldContext_EmbedderMutation_createEmbedder(ctx con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_EmbedderMutation_createEmbedder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_DatasourceMutation_createDatasource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _EmbedderMutation_updateEmbedder(ctx context.Context, field graphql.CollectedField, obj *EmbedderMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EmbedderMutation_updateEmbedder(ctx, field) +func (ec *executionContext) _DatasourceMutation_updateDatasource(ctx context.Context, field graphql.CollectedField, obj *DatasourceMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DatasourceMutation_updateDatasource(ctx, field) if err != nil { return graphql.Null } @@ -3391,7 +4458,7 @@ func (ec *executionContext) _EmbedderMutation_updateEmbedder(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EmbedderMutation().UpdateEmbedder(rctx, obj, fc.Args["input"].(*UpdateEmbedderInput)) + return ec.resolvers.DatasourceMutation().UpdateDatasource(rctx, obj, fc.Args["input"].(*UpdateDatasourceInput)) }) if err != nil { ec.Error(ctx, err) @@ -3403,41 +4470,45 @@ func (ec *executionContext) _EmbedderMutation_updateEmbedder(ctx context.Context } return graphql.Null } - res := resTmp.(*Embedder) + res := resTmp.(*Datasource) fc.Result = res - return ec.marshalNEmbedder2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEmbedder(ctx, field.Selections, res) + return ec.marshalNDatasource2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EmbedderMutation_updateEmbedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DatasourceMutation_updateDatasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EmbedderMutation", + Object: "DatasourceMutation", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "name": - return ec.fieldContext_Embedder_name(ctx, field) + return ec.fieldContext_Datasource_name(ctx, field) case "namespace": - return ec.fieldContext_Embedder_namespace(ctx, field) + return ec.fieldContext_Datasource_namespace(ctx, field) case "labels": - return ec.fieldContext_Embedder_labels(ctx, field) + return ec.fieldContext_Datasource_labels(ctx, field) case "annotations": - return ec.fieldContext_Embedder_annotations(ctx, field) + return ec.fieldContext_Datasource_annotations(ctx, field) case "creator": - return ec.fieldContext_Embedder_creator(ctx, field) + return ec.fieldContext_Datasource_creator(ctx, field) case "displayName": - return ec.fieldContext_Embedder_displayName(ctx, field) + return ec.fieldContext_Datasource_displayName(ctx, field) case "description": - return ec.fieldContext_Embedder_description(ctx, field) + return ec.fieldContext_Datasource_description(ctx, field) case "endpoint": - return ec.fieldContext_Embedder_endpoint(ctx, field) - case "serviceType": - return ec.fieldContext_Embedder_serviceType(ctx, field) + return ec.fieldContext_Datasource_endpoint(ctx, field) + case "oss": + return ec.fieldContext_Datasource_oss(ctx, field) + case "status": + return ec.fieldContext_Datasource_status(ctx, field) + case "fileCount": + return ec.fieldContext_Datasource_fileCount(ctx, field) case "updateTimestamp": - return ec.fieldContext_Embedder_updateTimestamp(ctx, field) + return ec.fieldContext_Datasource_updateTimestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Embedder", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Datasource", field.Name) }, } defer func() { @@ -3447,15 +4518,15 @@ func (ec *executionContext) fieldContext_EmbedderMutation_updateEmbedder(ctx con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_EmbedderMutation_updateEmbedder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_DatasourceMutation_updateDatasource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _EmbedderMutation_deleteEmbedder(ctx context.Context, field graphql.CollectedField, obj *EmbedderMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EmbedderMutation_deleteEmbedder(ctx, field) +func (ec *executionContext) _DatasourceMutation_deleteDatasource(ctx context.Context, field graphql.CollectedField, obj *DatasourceMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DatasourceMutation_deleteDatasource(ctx, field) if err != nil { return graphql.Null } @@ -3468,7 +4539,7 @@ func (ec *executionContext) _EmbedderMutation_deleteEmbedder(ctx context.Context }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EmbedderMutation().DeleteEmbedder(rctx, obj, fc.Args["input"].(*DeleteEmbedderInput)) + return ec.resolvers.DatasourceMutation().DeleteDatasource(rctx, obj, fc.Args["input"].(*DeleteDatasourceInput)) }) if err != nil { ec.Error(ctx, err) @@ -3482,9 +4553,9 @@ func (ec *executionContext) _EmbedderMutation_deleteEmbedder(ctx context.Context return ec.marshalOVoid2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EmbedderMutation_deleteEmbedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DatasourceMutation_deleteDatasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EmbedderMutation", + Object: "DatasourceMutation", Field: field, IsMethod: true, IsResolver: true, @@ -3499,15 +4570,15 @@ func (ec *executionContext) fieldContext_EmbedderMutation_deleteEmbedder(ctx con } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_EmbedderMutation_deleteEmbedder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_DatasourceMutation_deleteDatasource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _EmbedderQuery_getEmbedder(ctx context.Context, field graphql.CollectedField, obj *EmbedderQuery) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EmbedderQuery_getEmbedder(ctx, field) +func (ec *executionContext) _DatasourceQuery_getDatasource(ctx context.Context, field graphql.CollectedField, obj *DatasourceQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DatasourceQuery_getDatasource(ctx, field) if err != nil { return graphql.Null } @@ -3520,7 +4591,7 @@ func (ec *executionContext) _EmbedderQuery_getEmbedder(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EmbedderQuery().GetEmbedder(rctx, obj, fc.Args["name"].(string), fc.Args["namespace"].(string)) + return ec.resolvers.DatasourceQuery().GetDatasource(rctx, obj, fc.Args["name"].(string), fc.Args["namespace"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -3532,41 +4603,45 @@ func (ec *executionContext) _EmbedderQuery_getEmbedder(ctx context.Context, fiel } return graphql.Null } - res := resTmp.(*Embedder) + res := resTmp.(*Datasource) fc.Result = res - return ec.marshalNEmbedder2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEmbedder(ctx, field.Selections, res) + return ec.marshalNDatasource2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasource(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EmbedderQuery_getEmbedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DatasourceQuery_getDatasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EmbedderQuery", + Object: "DatasourceQuery", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "name": - return ec.fieldContext_Embedder_name(ctx, field) + return ec.fieldContext_Datasource_name(ctx, field) case "namespace": - return ec.fieldContext_Embedder_namespace(ctx, field) + return ec.fieldContext_Datasource_namespace(ctx, field) case "labels": - return ec.fieldContext_Embedder_labels(ctx, field) + return ec.fieldContext_Datasource_labels(ctx, field) case "annotations": - return ec.fieldContext_Embedder_annotations(ctx, field) + return ec.fieldContext_Datasource_annotations(ctx, field) case "creator": - return ec.fieldContext_Embedder_creator(ctx, field) + return ec.fieldContext_Datasource_creator(ctx, field) case "displayName": - return ec.fieldContext_Embedder_displayName(ctx, field) + return ec.fieldContext_Datasource_displayName(ctx, field) case "description": - return ec.fieldContext_Embedder_description(ctx, field) + return ec.fieldContext_Datasource_description(ctx, field) case "endpoint": - return ec.fieldContext_Embedder_endpoint(ctx, field) - case "serviceType": - return ec.fieldContext_Embedder_serviceType(ctx, field) + return ec.fieldContext_Datasource_endpoint(ctx, field) + case "oss": + return ec.fieldContext_Datasource_oss(ctx, field) + case "status": + return ec.fieldContext_Datasource_status(ctx, field) + case "fileCount": + return ec.fieldContext_Datasource_fileCount(ctx, field) case "updateTimestamp": - return ec.fieldContext_Embedder_updateTimestamp(ctx, field) + return ec.fieldContext_Datasource_updateTimestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Embedder", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Datasource", field.Name) }, } defer func() { @@ -3576,15 +4651,15 @@ func (ec *executionContext) fieldContext_EmbedderQuery_getEmbedder(ctx context.C } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_EmbedderQuery_getEmbedder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_DatasourceQuery_getDatasource_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _EmbedderQuery_listEmbedders(ctx context.Context, field graphql.CollectedField, obj *EmbedderQuery) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_EmbedderQuery_listEmbedders(ctx, field) +func (ec *executionContext) _DatasourceQuery_listDatasources(ctx context.Context, field graphql.CollectedField, obj *DatasourceQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_DatasourceQuery_listDatasources(ctx, field) if err != nil { return graphql.Null } @@ -3597,7 +4672,7 @@ func (ec *executionContext) _EmbedderQuery_listEmbedders(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.EmbedderQuery().ListEmbedders(rctx, obj, fc.Args["input"].(ListEmbedderInput)) + return ec.resolvers.DatasourceQuery().ListDatasources(rctx, obj, fc.Args["input"].(ListDatasourceInput)) }) if err != nil { ec.Error(ctx, err) @@ -3614,9 +4689,9 @@ func (ec *executionContext) _EmbedderQuery_listEmbedders(ctx context.Context, fi return ec.marshalNPaginatedResult2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPaginatedResult(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_EmbedderQuery_listEmbedders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_DatasourceQuery_listDatasources(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "EmbedderQuery", + Object: "DatasourceQuery", Field: field, IsMethod: true, IsResolver: true, @@ -3643,15 +4718,15 @@ func (ec *executionContext) fieldContext_EmbedderQuery_listEmbedders(ctx context } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_EmbedderQuery_listEmbedders_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_DatasourceQuery_listDatasources_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Endpoint_url(ctx context.Context, field graphql.CollectedField, obj *Endpoint) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Endpoint_url(ctx, field) +func (ec *executionContext) _Embedder_name(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Embedder_name(ctx, field) if err != nil { return graphql.Null } @@ -3664,23 +4739,26 @@ func (ec *executionContext) _Endpoint_url(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.URL, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Endpoint_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Embedder_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Endpoint", + Object: "Embedder", Field: field, IsMethod: false, IsResolver: false, @@ -3691,8 +4769,8 @@ func (ec *executionContext) fieldContext_Endpoint_url(ctx context.Context, field return fc, nil } -func (ec *executionContext) _Endpoint_authSecret(ctx context.Context, field graphql.CollectedField, obj *Endpoint) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Endpoint_authSecret(ctx, field) +func (ec *executionContext) _Embedder_namespace(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Embedder_namespace(ctx, field) if err != nil { return graphql.Null } @@ -3705,45 +4783,38 @@ func (ec *executionContext) _Endpoint_authSecret(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.AuthSecret, nil + return obj.Namespace, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - return graphql.Null - } - res := resTmp.(*TypedObjectReference) + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) fc.Result = res - return ec.marshalOTypedObjectReference2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReference(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Endpoint_authSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Embedder_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Endpoint", + Object: "Embedder", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "apiGroup": - return ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) - case "kind": - return ec.fieldContext_TypedObjectReference_kind(ctx, field) - case "Name": - return ec.fieldContext_TypedObjectReference_Name(ctx, field) - case "Namespace": - return ec.fieldContext_TypedObjectReference_Namespace(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TypedObjectReference", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Endpoint_insecure(ctx context.Context, field graphql.CollectedField, obj *Endpoint) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Endpoint_insecure(ctx, field) +func (ec *executionContext) _Embedder_labels(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Embedder_labels(ctx, field) if err != nil { return graphql.Null } @@ -3756,7 +4827,7 @@ func (ec *executionContext) _Endpoint_insecure(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Insecure, nil + return obj.Labels, nil }) if err != nil { ec.Error(ctx, err) @@ -3765,26 +4836,26 @@ func (ec *executionContext) _Endpoint_insecure(ctx context.Context, field graphq if resTmp == nil { return graphql.Null } - res := resTmp.(*bool) + res := resTmp.(map[string]interface{}) fc.Result = res - return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) + return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Endpoint_insecure(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Embedder_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Endpoint", + Object: "Embedder", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type Map does not have child fields") }, } return fc, nil } -func (ec *executionContext) _KnowledgeBase_name(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_name(ctx, field) +func (ec *executionContext) _Embedder_annotations(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Embedder_annotations(ctx, field) if err != nil { return graphql.Null } @@ -3797,38 +4868,35 @@ func (ec *executionContext) _KnowledgeBase_name(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.Annotations, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(map[string]interface{}) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBase_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Embedder_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBase", + Object: "Embedder", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Map does not have child fields") }, } return fc, nil } -func (ec *executionContext) _KnowledgeBase_namespace(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_namespace(ctx, field) +func (ec *executionContext) _Embedder_creator(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Embedder_creator(ctx, field) if err != nil { return graphql.Null } @@ -3841,26 +4909,23 @@ func (ec *executionContext) _KnowledgeBase_namespace(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Namespace, nil + return obj.Creator, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBase_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Embedder_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBase", + Object: "Embedder", Field: field, IsMethod: false, IsResolver: false, @@ -3871,8 +4936,8 @@ func (ec *executionContext) fieldContext_KnowledgeBase_namespace(ctx context.Con return fc, nil } -func (ec *executionContext) _KnowledgeBase_labels(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_labels(ctx, field) +func (ec *executionContext) _Embedder_displayName(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Embedder_displayName(ctx, field) if err != nil { return graphql.Null } @@ -3885,35 +4950,38 @@ func (ec *executionContext) _KnowledgeBase_labels(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Labels, nil + return obj.DisplayName, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(map[string]interface{}) + res := resTmp.(string) fc.Result = res - return ec.marshalOMap2map(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBase_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Embedder_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBase", + Object: "Embedder", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Map does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _KnowledgeBase_annotations(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_annotations(ctx, field) +func (ec *executionContext) _Embedder_description(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Embedder_description(ctx, field) if err != nil { return graphql.Null } @@ -3926,7 +4994,7 @@ func (ec *executionContext) _KnowledgeBase_annotations(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Annotations, nil + return obj.Description, nil }) if err != nil { ec.Error(ctx, err) @@ -3935,26 +5003,26 @@ func (ec *executionContext) _KnowledgeBase_annotations(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(map[string]interface{}) + res := resTmp.(*string) fc.Result = res - return ec.marshalOMap2map(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBase_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Embedder_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBase", + Object: "Embedder", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Map does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _KnowledgeBase_creator(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_creator(ctx, field) +func (ec *executionContext) _Embedder_endpoint(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Embedder_endpoint(ctx, field) if err != nil { return graphql.Null } @@ -3967,7 +5035,7 @@ func (ec *executionContext) _KnowledgeBase_creator(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Creator, nil + return obj.Endpoint, nil }) if err != nil { ec.Error(ctx, err) @@ -3976,26 +5044,34 @@ func (ec *executionContext) _KnowledgeBase_creator(ctx context.Context, field gr if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*Endpoint) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOEndpoint2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEndpoint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBase_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Embedder_endpoint(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBase", + Object: "Embedder", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "url": + return ec.fieldContext_Endpoint_url(ctx, field) + case "authSecret": + return ec.fieldContext_Endpoint_authSecret(ctx, field) + case "insecure": + return ec.fieldContext_Endpoint_insecure(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type Endpoint", field.Name) }, } return fc, nil } -func (ec *executionContext) _KnowledgeBase_displayName(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_displayName(ctx, field) +func (ec *executionContext) _Embedder_serviceType(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Embedder_serviceType(ctx, field) if err != nil { return graphql.Null } @@ -4008,26 +5084,23 @@ func (ec *executionContext) _KnowledgeBase_displayName(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DisplayName, nil + return obj.ServiceType, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBase_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Embedder_serviceType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBase", + Object: "Embedder", Field: field, IsMethod: false, IsResolver: false, @@ -4038,8 +5111,8 @@ func (ec *executionContext) fieldContext_KnowledgeBase_displayName(ctx context.C return fc, nil } -func (ec *executionContext) _KnowledgeBase_description(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_description(ctx, field) +func (ec *executionContext) _Embedder_updateTimestamp(ctx context.Context, field graphql.CollectedField, obj *Embedder) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Embedder_updateTimestamp(ctx, field) if err != nil { return graphql.Null } @@ -4052,7 +5125,7 @@ func (ec *executionContext) _KnowledgeBase_description(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.UpdateTimestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -4061,26 +5134,26 @@ func (ec *executionContext) _KnowledgeBase_description(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*time.Time) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBase_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Embedder_updateTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBase", + Object: "Embedder", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _KnowledgeBase_embedder(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_embedder(ctx, field) +func (ec *executionContext) _EmbedderMutation_createEmbedder(ctx context.Context, field graphql.CollectedField, obj *EmbedderMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EmbedderMutation_createEmbedder(ctx, field) if err != nil { return graphql.Null } @@ -4093,45 +5166,71 @@ func (ec *executionContext) _KnowledgeBase_embedder(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Embedder, nil + return ec.resolvers.EmbedderMutation().CreateEmbedder(rctx, obj, fc.Args["input"].(CreateEmbedderInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*TypedObjectReference) + res := resTmp.(*Embedder) fc.Result = res - return ec.marshalOTypedObjectReference2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReference(ctx, field.Selections, res) + return ec.marshalNEmbedder2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEmbedder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBase_embedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EmbedderMutation_createEmbedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBase", + Object: "EmbedderMutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "apiGroup": - return ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) - case "kind": - return ec.fieldContext_TypedObjectReference_kind(ctx, field) - case "Name": - return ec.fieldContext_TypedObjectReference_Name(ctx, field) - case "Namespace": - return ec.fieldContext_TypedObjectReference_Namespace(ctx, field) + case "name": + return ec.fieldContext_Embedder_name(ctx, field) + case "namespace": + return ec.fieldContext_Embedder_namespace(ctx, field) + case "labels": + return ec.fieldContext_Embedder_labels(ctx, field) + case "annotations": + return ec.fieldContext_Embedder_annotations(ctx, field) + case "creator": + return ec.fieldContext_Embedder_creator(ctx, field) + case "displayName": + return ec.fieldContext_Embedder_displayName(ctx, field) + case "description": + return ec.fieldContext_Embedder_description(ctx, field) + case "endpoint": + return ec.fieldContext_Embedder_endpoint(ctx, field) + case "serviceType": + return ec.fieldContext_Embedder_serviceType(ctx, field) + case "updateTimestamp": + return ec.fieldContext_Embedder_updateTimestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TypedObjectReference", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Embedder", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_EmbedderMutation_createEmbedder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _KnowledgeBase_vectorStore(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_vectorStore(ctx, field) +func (ec *executionContext) _EmbedderMutation_updateEmbedder(ctx context.Context, field graphql.CollectedField, obj *EmbedderMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EmbedderMutation_updateEmbedder(ctx, field) if err != nil { return graphql.Null } @@ -4144,92 +5243,71 @@ func (ec *executionContext) _KnowledgeBase_vectorStore(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.VectorStore, nil + return ec.resolvers.EmbedderMutation().UpdateEmbedder(rctx, obj, fc.Args["input"].(*UpdateEmbedderInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*TypedObjectReference) + res := resTmp.(*Embedder) fc.Result = res - return ec.marshalOTypedObjectReference2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReference(ctx, field.Selections, res) + return ec.marshalNEmbedder2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEmbedder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBase_vectorStore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EmbedderMutation_updateEmbedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBase", + Object: "EmbedderMutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "apiGroup": - return ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) - case "kind": - return ec.fieldContext_TypedObjectReference_kind(ctx, field) - case "Name": - return ec.fieldContext_TypedObjectReference_Name(ctx, field) - case "Namespace": - return ec.fieldContext_TypedObjectReference_Namespace(ctx, field) + case "name": + return ec.fieldContext_Embedder_name(ctx, field) + case "namespace": + return ec.fieldContext_Embedder_namespace(ctx, field) + case "labels": + return ec.fieldContext_Embedder_labels(ctx, field) + case "annotations": + return ec.fieldContext_Embedder_annotations(ctx, field) + case "creator": + return ec.fieldContext_Embedder_creator(ctx, field) + case "displayName": + return ec.fieldContext_Embedder_displayName(ctx, field) + case "description": + return ec.fieldContext_Embedder_description(ctx, field) + case "endpoint": + return ec.fieldContext_Embedder_endpoint(ctx, field) + case "serviceType": + return ec.fieldContext_Embedder_serviceType(ctx, field) + case "updateTimestamp": + return ec.fieldContext_Embedder_updateTimestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type TypedObjectReference", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Embedder", field.Name) }, } - return fc, nil -} - -func (ec *executionContext) _KnowledgeBase_fileGroups(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_fileGroups(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null + err = ec.Recover(ctx, r) + ec.Error(ctx, err) } }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.FileGroups, nil - }) - if err != nil { + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_EmbedderMutation_updateEmbedder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - return graphql.Null - } - res := resTmp.([]*Filegroup) - fc.Result = res - return ec.marshalOfilegroup2ᚕᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFilegroup(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_KnowledgeBase_fileGroups(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "KnowledgeBase", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "source": - return ec.fieldContext_filegroup_source(ctx, field) - case "path": - return ec.fieldContext_filegroup_path(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type filegroup", field.Name) - }, + return fc, err } return fc, nil } -func (ec *executionContext) _KnowledgeBase_status(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_status(ctx, field) +func (ec *executionContext) _EmbedderMutation_deleteEmbedder(ctx context.Context, field graphql.CollectedField, obj *EmbedderMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EmbedderMutation_deleteEmbedder(ctx, field) if err != nil { return graphql.Null } @@ -4242,7 +5320,7 @@ func (ec *executionContext) _KnowledgeBase_status(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Status, nil + return ec.resolvers.EmbedderMutation().DeleteEmbedder(rctx, obj, fc.Args["input"].(*DeleteEmbedderInput)) }) if err != nil { ec.Error(ctx, err) @@ -4253,68 +5331,35 @@ func (ec *executionContext) _KnowledgeBase_status(ctx context.Context, field gra } res := resTmp.(*string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOVoid2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBase_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EmbedderMutation_deleteEmbedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBase", + Object: "EmbedderMutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Void does not have child fields") }, } - return fc, nil -} - -func (ec *executionContext) _KnowledgeBase_updateTimestamp(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBase_updateTimestamp(ctx, field) - if err != nil { - return graphql.Null - } - ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - ret = graphql.Null + err = ec.Recover(ctx, r) + ec.Error(ctx, err) } }() - resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { - ctx = rctx // use context from middleware stack in children - return obj.UpdateTimestamp, nil - }) - if err != nil { + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_EmbedderMutation_deleteEmbedder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) - return graphql.Null - } - if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } - return graphql.Null - } - res := resTmp.(time.Time) - fc.Result = res - return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) -} - -func (ec *executionContext) fieldContext_KnowledgeBase_updateTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { - fc = &graphql.FieldContext{ - Object: "KnowledgeBase", - Field: field, - IsMethod: false, - IsResolver: false, - Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") - }, + return fc, err } return fc, nil } -func (ec *executionContext) _KnowledgeBaseMutation_createKnowledgeBase(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBaseMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBaseMutation_createKnowledgeBase(ctx, field) +func (ec *executionContext) _EmbedderQuery_getEmbedder(ctx context.Context, field graphql.CollectedField, obj *EmbedderQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EmbedderQuery_getEmbedder(ctx, field) if err != nil { return graphql.Null } @@ -4327,7 +5372,7 @@ func (ec *executionContext) _KnowledgeBaseMutation_createKnowledgeBase(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.KnowledgeBaseMutation().CreateKnowledgeBase(rctx, obj, fc.Args["input"].(CreateKnowledgeBaseInput)) + return ec.resolvers.EmbedderQuery().GetEmbedder(rctx, obj, fc.Args["name"].(string), fc.Args["namespace"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -4339,45 +5384,41 @@ func (ec *executionContext) _KnowledgeBaseMutation_createKnowledgeBase(ctx conte } return graphql.Null } - res := resTmp.(*KnowledgeBase) + res := resTmp.(*Embedder) fc.Result = res - return ec.marshalNKnowledgeBase2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐKnowledgeBase(ctx, field.Selections, res) + return ec.marshalNEmbedder2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEmbedder(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBaseMutation_createKnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EmbedderQuery_getEmbedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBaseMutation", + Object: "EmbedderQuery", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { case "name": - return ec.fieldContext_KnowledgeBase_name(ctx, field) + return ec.fieldContext_Embedder_name(ctx, field) case "namespace": - return ec.fieldContext_KnowledgeBase_namespace(ctx, field) + return ec.fieldContext_Embedder_namespace(ctx, field) case "labels": - return ec.fieldContext_KnowledgeBase_labels(ctx, field) + return ec.fieldContext_Embedder_labels(ctx, field) case "annotations": - return ec.fieldContext_KnowledgeBase_annotations(ctx, field) + return ec.fieldContext_Embedder_annotations(ctx, field) case "creator": - return ec.fieldContext_KnowledgeBase_creator(ctx, field) + return ec.fieldContext_Embedder_creator(ctx, field) case "displayName": - return ec.fieldContext_KnowledgeBase_displayName(ctx, field) + return ec.fieldContext_Embedder_displayName(ctx, field) case "description": - return ec.fieldContext_KnowledgeBase_description(ctx, field) - case "embedder": - return ec.fieldContext_KnowledgeBase_embedder(ctx, field) - case "vectorStore": - return ec.fieldContext_KnowledgeBase_vectorStore(ctx, field) - case "fileGroups": - return ec.fieldContext_KnowledgeBase_fileGroups(ctx, field) - case "status": - return ec.fieldContext_KnowledgeBase_status(ctx, field) + return ec.fieldContext_Embedder_description(ctx, field) + case "endpoint": + return ec.fieldContext_Embedder_endpoint(ctx, field) + case "serviceType": + return ec.fieldContext_Embedder_serviceType(ctx, field) case "updateTimestamp": - return ec.fieldContext_KnowledgeBase_updateTimestamp(ctx, field) + return ec.fieldContext_Embedder_updateTimestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type KnowledgeBase", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Embedder", field.Name) }, } defer func() { @@ -4387,15 +5428,15 @@ func (ec *executionContext) fieldContext_KnowledgeBaseMutation_createKnowledgeBa } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_KnowledgeBaseMutation_createKnowledgeBase_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_EmbedderQuery_getEmbedder_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _KnowledgeBaseMutation_updateKnowledgeBase(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBaseMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBaseMutation_updateKnowledgeBase(ctx, field) +func (ec *executionContext) _EmbedderQuery_listEmbedders(ctx context.Context, field graphql.CollectedField, obj *EmbedderQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_EmbedderQuery_listEmbedders(ctx, field) if err != nil { return graphql.Null } @@ -4408,7 +5449,7 @@ func (ec *executionContext) _KnowledgeBaseMutation_updateKnowledgeBase(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.KnowledgeBaseMutation().UpdateKnowledgeBase(rctx, obj, fc.Args["input"].(*UpdateKnowledgeBaseInput)) + return ec.resolvers.EmbedderQuery().ListEmbedders(rctx, obj, fc.Args["input"].(ListEmbedderInput)) }) if err != nil { ec.Error(ctx, err) @@ -4420,45 +5461,31 @@ func (ec *executionContext) _KnowledgeBaseMutation_updateKnowledgeBase(ctx conte } return graphql.Null } - res := resTmp.(*KnowledgeBase) + res := resTmp.(*PaginatedResult) fc.Result = res - return ec.marshalNKnowledgeBase2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐKnowledgeBase(ctx, field.Selections, res) + return ec.marshalNPaginatedResult2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPaginatedResult(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBaseMutation_updateKnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_EmbedderQuery_listEmbedders(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBaseMutation", + Object: "EmbedderQuery", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "name": - return ec.fieldContext_KnowledgeBase_name(ctx, field) - case "namespace": - return ec.fieldContext_KnowledgeBase_namespace(ctx, field) - case "labels": - return ec.fieldContext_KnowledgeBase_labels(ctx, field) - case "annotations": - return ec.fieldContext_KnowledgeBase_annotations(ctx, field) - case "creator": - return ec.fieldContext_KnowledgeBase_creator(ctx, field) - case "displayName": - return ec.fieldContext_KnowledgeBase_displayName(ctx, field) - case "description": - return ec.fieldContext_KnowledgeBase_description(ctx, field) - case "embedder": - return ec.fieldContext_KnowledgeBase_embedder(ctx, field) - case "vectorStore": - return ec.fieldContext_KnowledgeBase_vectorStore(ctx, field) - case "fileGroups": - return ec.fieldContext_KnowledgeBase_fileGroups(ctx, field) - case "status": - return ec.fieldContext_KnowledgeBase_status(ctx, field) - case "updateTimestamp": - return ec.fieldContext_KnowledgeBase_updateTimestamp(ctx, field) + case "hasNextPage": + return ec.fieldContext_PaginatedResult_hasNextPage(ctx, field) + case "nodes": + return ec.fieldContext_PaginatedResult_nodes(ctx, field) + case "page": + return ec.fieldContext_PaginatedResult_page(ctx, field) + case "pageSize": + return ec.fieldContext_PaginatedResult_pageSize(ctx, field) + case "totalCount": + return ec.fieldContext_PaginatedResult_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type KnowledgeBase", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PaginatedResult", field.Name) }, } defer func() { @@ -4468,15 +5495,15 @@ func (ec *executionContext) fieldContext_KnowledgeBaseMutation_updateKnowledgeBa } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_KnowledgeBaseMutation_updateKnowledgeBase_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_EmbedderQuery_listEmbedders_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _KnowledgeBaseMutation_deleteKnowledgeBase(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBaseMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBaseMutation_deleteKnowledgeBase(ctx, field) +func (ec *executionContext) _Endpoint_url(ctx context.Context, field graphql.CollectedField, obj *Endpoint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Endpoint_url(ctx, field) if err != nil { return graphql.Null } @@ -4489,7 +5516,7 @@ func (ec *executionContext) _KnowledgeBaseMutation_deleteKnowledgeBase(ctx conte }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.KnowledgeBaseMutation().DeleteKnowledgeBase(rctx, obj, fc.Args["input"].(*DeleteKnowledgeBaseInput)) + return obj.URL, nil }) if err != nil { ec.Error(ctx, err) @@ -4500,35 +5527,24 @@ func (ec *executionContext) _KnowledgeBaseMutation_deleteKnowledgeBase(ctx conte } res := resTmp.(*string) fc.Result = res - return ec.marshalOVoid2ᚖstring(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBaseMutation_deleteKnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Endpoint_url(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBaseMutation", + Object: "Endpoint", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Void does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_KnowledgeBaseMutation_deleteKnowledgeBase_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _KnowledgeBaseQuery_getKnowledgeBase(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBaseQuery) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBaseQuery_getKnowledgeBase(ctx, field) +func (ec *executionContext) _Endpoint_authSecret(ctx context.Context, field graphql.CollectedField, obj *Endpoint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Endpoint_authSecret(ctx, field) if err != nil { return graphql.Null } @@ -4541,75 +5557,45 @@ func (ec *executionContext) _KnowledgeBaseQuery_getKnowledgeBase(ctx context.Con }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.KnowledgeBaseQuery().GetKnowledgeBase(rctx, obj, fc.Args["name"].(string), fc.Args["namespace"].(string)) + return obj.AuthSecret, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*KnowledgeBase) + res := resTmp.(*TypedObjectReference) fc.Result = res - return ec.marshalNKnowledgeBase2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐKnowledgeBase(ctx, field.Selections, res) + return ec.marshalOTypedObjectReference2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBaseQuery_getKnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Endpoint_authSecret(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBaseQuery", + Object: "Endpoint", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "name": - return ec.fieldContext_KnowledgeBase_name(ctx, field) - case "namespace": - return ec.fieldContext_KnowledgeBase_namespace(ctx, field) - case "labels": - return ec.fieldContext_KnowledgeBase_labels(ctx, field) - case "annotations": - return ec.fieldContext_KnowledgeBase_annotations(ctx, field) - case "creator": - return ec.fieldContext_KnowledgeBase_creator(ctx, field) - case "displayName": - return ec.fieldContext_KnowledgeBase_displayName(ctx, field) - case "description": - return ec.fieldContext_KnowledgeBase_description(ctx, field) - case "embedder": - return ec.fieldContext_KnowledgeBase_embedder(ctx, field) - case "vectorStore": - return ec.fieldContext_KnowledgeBase_vectorStore(ctx, field) - case "fileGroups": - return ec.fieldContext_KnowledgeBase_fileGroups(ctx, field) - case "status": - return ec.fieldContext_KnowledgeBase_status(ctx, field) - case "updateTimestamp": - return ec.fieldContext_KnowledgeBase_updateTimestamp(ctx, field) + case "apiGroup": + return ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) + case "kind": + return ec.fieldContext_TypedObjectReference_kind(ctx, field) + case "Name": + return ec.fieldContext_TypedObjectReference_Name(ctx, field) + case "Namespace": + return ec.fieldContext_TypedObjectReference_Namespace(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type KnowledgeBase", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TypedObjectReference", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_KnowledgeBaseQuery_getKnowledgeBase_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _KnowledgeBaseQuery_listKnowledgeBases(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBaseQuery) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_KnowledgeBaseQuery_listKnowledgeBases(ctx, field) +func (ec *executionContext) _Endpoint_insecure(ctx context.Context, field graphql.CollectedField, obj *Endpoint) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Endpoint_insecure(ctx, field) if err != nil { return graphql.Null } @@ -4622,61 +5608,35 @@ func (ec *executionContext) _KnowledgeBaseQuery_listKnowledgeBases(ctx context.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.KnowledgeBaseQuery().ListKnowledgeBases(rctx, obj, fc.Args["input"].(ListKnowledgeBaseInput)) + return obj.Insecure, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*PaginatedResult) + res := resTmp.(*bool) fc.Result = res - return ec.marshalNPaginatedResult2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPaginatedResult(ctx, field.Selections, res) + return ec.marshalOBoolean2ᚖbool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_KnowledgeBaseQuery_listKnowledgeBases(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Endpoint_insecure(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "KnowledgeBaseQuery", + Object: "Endpoint", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PaginatedResult_hasNextPage(ctx, field) - case "nodes": - return ec.fieldContext_PaginatedResult_nodes(ctx, field) - case "page": - return ec.fieldContext_PaginatedResult_page(ctx, field) - case "pageSize": - return ec.fieldContext_PaginatedResult_pageSize(ctx, field) - case "totalCount": - return ec.fieldContext_PaginatedResult_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PaginatedResult", field.Name) + return nil, errors.New("field of type Boolean does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_KnowledgeBaseQuery_listKnowledgeBases_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Model_name(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Model_name(ctx, field) +func (ec *executionContext) _F_datasource(ctx context.Context, field graphql.CollectedField, obj *F) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_F_datasource(ctx, field) if err != nil { return graphql.Null } @@ -4689,7 +5649,7 @@ func (ec *executionContext) _Model_name(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.Datasource, nil }) if err != nil { ec.Error(ctx, err) @@ -4701,26 +5661,36 @@ func (ec *executionContext) _Model_name(ctx context.Context, field graphql.Colle } return graphql.Null } - res := resTmp.(string) + res := resTmp.(TypedObjectReference) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNTypedObjectReference2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Model_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_F_datasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Model", + Object: "F", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "apiGroup": + return ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) + case "kind": + return ec.fieldContext_TypedObjectReference_kind(ctx, field) + case "Name": + return ec.fieldContext_TypedObjectReference_Name(ctx, field) + case "Namespace": + return ec.fieldContext_TypedObjectReference_Namespace(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TypedObjectReference", field.Name) }, } return fc, nil } -func (ec *executionContext) _Model_namespace(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Model_namespace(ctx, field) +func (ec *executionContext) _F_path(ctx context.Context, field graphql.CollectedField, obj *F) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_F_path(ctx, field) if err != nil { return graphql.Null } @@ -4733,7 +5703,7 @@ func (ec *executionContext) _Model_namespace(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Namespace, nil + return obj.Path, nil }) if err != nil { ec.Error(ctx, err) @@ -4750,9 +5720,9 @@ func (ec *executionContext) _Model_namespace(ctx context.Context, field graphql. return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Model_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_F_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Model", + Object: "F", Field: field, IsMethod: false, IsResolver: false, @@ -4763,8 +5733,8 @@ func (ec *executionContext) fieldContext_Model_namespace(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _Model_labels(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Model_labels(ctx, field) +func (ec *executionContext) _F_md5(ctx context.Context, field graphql.CollectedField, obj *F) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_F_md5(ctx, field) if err != nil { return graphql.Null } @@ -4777,7 +5747,7 @@ func (ec *executionContext) _Model_labels(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Labels, nil + return obj.Md5, nil }) if err != nil { ec.Error(ctx, err) @@ -4786,26 +5756,26 @@ func (ec *executionContext) _Model_labels(ctx context.Context, field graphql.Col if resTmp == nil { return graphql.Null } - res := resTmp.(map[string]interface{}) + res := resTmp.(*string) fc.Result = res - return ec.marshalOMap2map(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Model_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_F_md5(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Model", + Object: "F", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Map does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Model_annotations(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Model_annotations(ctx, field) +func (ec *executionContext) _F_time(ctx context.Context, field graphql.CollectedField, obj *F) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_F_time(ctx, field) if err != nil { return graphql.Null } @@ -4818,7 +5788,7 @@ func (ec *executionContext) _Model_annotations(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Annotations, nil + return obj.Time, nil }) if err != nil { ec.Error(ctx, err) @@ -4827,26 +5797,26 @@ func (ec *executionContext) _Model_annotations(ctx context.Context, field graphq if resTmp == nil { return graphql.Null } - res := resTmp.(map[string]interface{}) + res := resTmp.(*time.Time) fc.Result = res - return ec.marshalOMap2map(ctx, field.Selections, res) + return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Model_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_F_time(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Model", + Object: "F", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Map does not have child fields") + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Model_creator(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Model_creator(ctx, field) +func (ec *executionContext) _KnowledgeBase_name(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_name(ctx, field) if err != nil { return graphql.Null } @@ -4859,23 +5829,26 @@ func (ec *executionContext) _Model_creator(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Creator, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Model_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBase_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Model", + Object: "KnowledgeBase", Field: field, IsMethod: false, IsResolver: false, @@ -4886,8 +5859,8 @@ func (ec *executionContext) fieldContext_Model_creator(ctx context.Context, fiel return fc, nil } -func (ec *executionContext) _Model_displayName(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Model_displayName(ctx, field) +func (ec *executionContext) _KnowledgeBase_namespace(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_namespace(ctx, field) if err != nil { return graphql.Null } @@ -4900,7 +5873,7 @@ func (ec *executionContext) _Model_displayName(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DisplayName, nil + return obj.Namespace, nil }) if err != nil { ec.Error(ctx, err) @@ -4917,9 +5890,9 @@ func (ec *executionContext) _Model_displayName(ctx context.Context, field graphq return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Model_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBase_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Model", + Object: "KnowledgeBase", Field: field, IsMethod: false, IsResolver: false, @@ -4930,8 +5903,8 @@ func (ec *executionContext) fieldContext_Model_displayName(ctx context.Context, return fc, nil } -func (ec *executionContext) _Model_description(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Model_description(ctx, field) +func (ec *executionContext) _KnowledgeBase_labels(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_labels(ctx, field) if err != nil { return graphql.Null } @@ -4944,7 +5917,7 @@ func (ec *executionContext) _Model_description(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description, nil + return obj.Labels, nil }) if err != nil { ec.Error(ctx, err) @@ -4953,26 +5926,26 @@ func (ec *executionContext) _Model_description(ctx context.Context, field graphq if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(map[string]interface{}) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Model_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBase_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Model", + Object: "KnowledgeBase", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Map does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Model_field(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Model_field(ctx, field) +func (ec *executionContext) _KnowledgeBase_annotations(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_annotations(ctx, field) if err != nil { return graphql.Null } @@ -4985,38 +5958,35 @@ func (ec *executionContext) _Model_field(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Field, nil + return obj.Annotations, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(map[string]interface{}) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Model_field(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBase_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Model", + Object: "KnowledgeBase", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Map does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Model_modeltype(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Model_modeltype(ctx, field) +func (ec *executionContext) _KnowledgeBase_creator(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_creator(ctx, field) if err != nil { return graphql.Null } @@ -5029,26 +5999,23 @@ func (ec *executionContext) _Model_modeltype(ctx context.Context, field graphql. }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Modeltype, nil + return obj.Creator, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Model_modeltype(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBase_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Model", + Object: "KnowledgeBase", Field: field, IsMethod: false, IsResolver: false, @@ -5059,8 +6026,8 @@ func (ec *executionContext) fieldContext_Model_modeltype(ctx context.Context, fi return fc, nil } -func (ec *executionContext) _Model_updateTimestamp(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Model_updateTimestamp(ctx, field) +func (ec *executionContext) _KnowledgeBase_displayName(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_displayName(ctx, field) if err != nil { return graphql.Null } @@ -5073,35 +6040,38 @@ func (ec *executionContext) _Model_updateTimestamp(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.UpdateTimestamp, nil + return obj.DisplayName, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*time.Time) + res := resTmp.(string) fc.Result = res - return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Model_updateTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBase_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Model", + Object: "KnowledgeBase", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Time does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _ModelMutation_createModel(ctx context.Context, field graphql.CollectedField, obj *ModelMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ModelMutation_createModel(ctx, field) +func (ec *executionContext) _KnowledgeBase_description(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_description(ctx, field) if err != nil { return graphql.Null } @@ -5114,71 +6084,35 @@ func (ec *executionContext) _ModelMutation_createModel(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ModelMutation().CreateModel(rctx, obj, fc.Args["input"].(CreateModelInput)) + return obj.Description, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*Model) + res := resTmp.(*string) fc.Result = res - return ec.marshalNModel2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐModel(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ModelMutation_createModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBase_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ModelMutation", + Object: "KnowledgeBase", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext_Model_name(ctx, field) - case "namespace": - return ec.fieldContext_Model_namespace(ctx, field) - case "labels": - return ec.fieldContext_Model_labels(ctx, field) - case "annotations": - return ec.fieldContext_Model_annotations(ctx, field) - case "creator": - return ec.fieldContext_Model_creator(ctx, field) - case "displayName": - return ec.fieldContext_Model_displayName(ctx, field) - case "description": - return ec.fieldContext_Model_description(ctx, field) - case "field": - return ec.fieldContext_Model_field(ctx, field) - case "modeltype": - return ec.fieldContext_Model_modeltype(ctx, field) - case "updateTimestamp": - return ec.fieldContext_Model_updateTimestamp(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type Model", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_ModelMutation_createModel_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _ModelMutation_updateModel(ctx context.Context, field graphql.CollectedField, obj *ModelMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ModelMutation_updateModel(ctx, field) +func (ec *executionContext) _KnowledgeBase_embedder(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_embedder(ctx, field) if err != nil { return graphql.Null } @@ -5191,71 +6125,45 @@ func (ec *executionContext) _ModelMutation_updateModel(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ModelMutation().UpdateModel(rctx, obj, fc.Args["input"].(*UpdateModelInput)) + return obj.Embedder, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*Model) + res := resTmp.(*TypedObjectReference) fc.Result = res - return ec.marshalNModel2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐModel(ctx, field.Selections, res) + return ec.marshalOTypedObjectReference2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ModelMutation_updateModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBase_embedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ModelMutation", + Object: "KnowledgeBase", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "name": - return ec.fieldContext_Model_name(ctx, field) - case "namespace": - return ec.fieldContext_Model_namespace(ctx, field) - case "labels": - return ec.fieldContext_Model_labels(ctx, field) - case "annotations": - return ec.fieldContext_Model_annotations(ctx, field) - case "creator": - return ec.fieldContext_Model_creator(ctx, field) - case "displayName": - return ec.fieldContext_Model_displayName(ctx, field) - case "description": - return ec.fieldContext_Model_description(ctx, field) - case "field": - return ec.fieldContext_Model_field(ctx, field) - case "modeltype": - return ec.fieldContext_Model_modeltype(ctx, field) - case "updateTimestamp": - return ec.fieldContext_Model_updateTimestamp(ctx, field) + case "apiGroup": + return ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) + case "kind": + return ec.fieldContext_TypedObjectReference_kind(ctx, field) + case "Name": + return ec.fieldContext_TypedObjectReference_Name(ctx, field) + case "Namespace": + return ec.fieldContext_TypedObjectReference_Namespace(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Model", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TypedObjectReference", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_ModelMutation_updateModel_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _ModelMutation_deleteModel(ctx context.Context, field graphql.CollectedField, obj *ModelMutation) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ModelMutation_deleteModel(ctx, field) +func (ec *executionContext) _KnowledgeBase_vectorStore(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_vectorStore(ctx, field) if err != nil { return graphql.Null } @@ -5268,7 +6176,7 @@ func (ec *executionContext) _ModelMutation_deleteModel(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ModelMutation().DeleteModel(rctx, obj, fc.Args["input"].(*DeleteModelInput)) + return obj.VectorStore, nil }) if err != nil { ec.Error(ctx, err) @@ -5277,37 +6185,36 @@ func (ec *executionContext) _ModelMutation_deleteModel(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*TypedObjectReference) fc.Result = res - return ec.marshalOVoid2ᚖstring(ctx, field.Selections, res) + return ec.marshalOTypedObjectReference2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ModelMutation_deleteModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBase_vectorStore(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ModelMutation", + Object: "KnowledgeBase", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Void does not have child fields") + switch field.Name { + case "apiGroup": + return ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) + case "kind": + return ec.fieldContext_TypedObjectReference_kind(ctx, field) + case "Name": + return ec.fieldContext_TypedObjectReference_Name(ctx, field) + case "Namespace": + return ec.fieldContext_TypedObjectReference_Namespace(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TypedObjectReference", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_ModelMutation_deleteModel_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _ModelQuery_getModel(ctx context.Context, field graphql.CollectedField, obj *ModelQuery) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ModelQuery_getModel(ctx, field) +func (ec *executionContext) _KnowledgeBase_fileGroups(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_fileGroups(ctx, field) if err != nil { return graphql.Null } @@ -5320,71 +6227,41 @@ func (ec *executionContext) _ModelQuery_getModel(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ModelQuery().GetModel(rctx, obj, fc.Args["name"].(string), fc.Args["namespace"].(string)) + return obj.FileGroups, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*Model) + res := resTmp.([]*Filegroup) fc.Result = res - return ec.marshalNModel2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐModel(ctx, field.Selections, res) + return ec.marshalOfilegroup2ᚕᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFilegroup(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ModelQuery_getModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBase_fileGroups(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ModelQuery", + Object: "KnowledgeBase", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "name": - return ec.fieldContext_Model_name(ctx, field) - case "namespace": - return ec.fieldContext_Model_namespace(ctx, field) - case "labels": - return ec.fieldContext_Model_labels(ctx, field) - case "annotations": - return ec.fieldContext_Model_annotations(ctx, field) - case "creator": - return ec.fieldContext_Model_creator(ctx, field) - case "displayName": - return ec.fieldContext_Model_displayName(ctx, field) - case "description": - return ec.fieldContext_Model_description(ctx, field) - case "field": - return ec.fieldContext_Model_field(ctx, field) - case "modeltype": - return ec.fieldContext_Model_modeltype(ctx, field) - case "updateTimestamp": - return ec.fieldContext_Model_updateTimestamp(ctx, field) + case "source": + return ec.fieldContext_filegroup_source(ctx, field) + case "path": + return ec.fieldContext_filegroup_path(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type Model", field.Name) + return nil, fmt.Errorf("no field named %q was found under type filegroup", field.Name) }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_ModelQuery_getModel_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _ModelQuery_listModels(ctx context.Context, field graphql.CollectedField, obj *ModelQuery) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_ModelQuery_listModels(ctx, field) +func (ec *executionContext) _KnowledgeBase_status(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_status(ctx, field) if err != nil { return graphql.Null } @@ -5397,61 +6274,79 @@ func (ec *executionContext) _ModelQuery_listModels(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.ModelQuery().ListModels(rctx, obj, fc.Args["input"].(ListModelInput)) + return obj.Status, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*PaginatedResult) + res := resTmp.(*string) fc.Result = res - return ec.marshalNPaginatedResult2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPaginatedResult(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_ModelQuery_listModels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBase_status(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "ModelQuery", + Object: "KnowledgeBase", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "hasNextPage": - return ec.fieldContext_PaginatedResult_hasNextPage(ctx, field) - case "nodes": - return ec.fieldContext_PaginatedResult_nodes(ctx, field) - case "page": - return ec.fieldContext_PaginatedResult_page(ctx, field) - case "pageSize": - return ec.fieldContext_PaginatedResult_pageSize(ctx, field) - case "totalCount": - return ec.fieldContext_PaginatedResult_totalCount(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type PaginatedResult", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } + return fc, nil +} + +func (ec *executionContext) _KnowledgeBase_updateTimestamp(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBase) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBase_updateTimestamp(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) defer func() { if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null } }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_ModelQuery_listModels_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.UpdateTimestamp, nil + }) + if err != nil { ec.Error(ctx, err) - return fc, err + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(time.Time) + fc.Result = res + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_KnowledgeBase_updateTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "KnowledgeBase", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Time does not have child fields") + }, } return fc, nil } -func (ec *executionContext) _Mutation_hello(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_hello(ctx, field) +func (ec *executionContext) _KnowledgeBaseMutation_createKnowledgeBase(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBaseMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBaseMutation_createKnowledgeBase(ctx, field) if err != nil { return graphql.Null } @@ -5464,7 +6359,7 @@ func (ec *executionContext) _Mutation_hello(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().Hello(rctx, fc.Args["name"].(string)) + return ec.resolvers.KnowledgeBaseMutation().CreateKnowledgeBase(rctx, obj, fc.Args["input"].(CreateKnowledgeBaseInput)) }) if err != nil { ec.Error(ctx, err) @@ -5476,19 +6371,45 @@ func (ec *executionContext) _Mutation_hello(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*KnowledgeBase) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalNKnowledgeBase2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐKnowledgeBase(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_hello(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBaseMutation_createKnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "KnowledgeBaseMutation", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "name": + return ec.fieldContext_KnowledgeBase_name(ctx, field) + case "namespace": + return ec.fieldContext_KnowledgeBase_namespace(ctx, field) + case "labels": + return ec.fieldContext_KnowledgeBase_labels(ctx, field) + case "annotations": + return ec.fieldContext_KnowledgeBase_annotations(ctx, field) + case "creator": + return ec.fieldContext_KnowledgeBase_creator(ctx, field) + case "displayName": + return ec.fieldContext_KnowledgeBase_displayName(ctx, field) + case "description": + return ec.fieldContext_KnowledgeBase_description(ctx, field) + case "embedder": + return ec.fieldContext_KnowledgeBase_embedder(ctx, field) + case "vectorStore": + return ec.fieldContext_KnowledgeBase_vectorStore(ctx, field) + case "fileGroups": + return ec.fieldContext_KnowledgeBase_fileGroups(ctx, field) + case "status": + return ec.fieldContext_KnowledgeBase_status(ctx, field) + case "updateTimestamp": + return ec.fieldContext_KnowledgeBase_updateTimestamp(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type KnowledgeBase", field.Name) }, } defer func() { @@ -5498,15 +6419,15 @@ func (ec *executionContext) fieldContext_Mutation_hello(ctx context.Context, fie } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Mutation_hello_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_KnowledgeBaseMutation_createKnowledgeBase_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Mutation_Datasource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_Datasource(ctx, field) +func (ec *executionContext) _KnowledgeBaseMutation_updateKnowledgeBase(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBaseMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBaseMutation_updateKnowledgeBase(ctx, field) if err != nil { return graphql.Null } @@ -5519,43 +6440,75 @@ func (ec *executionContext) _Mutation_Datasource(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().Datasource(rctx) + return ec.resolvers.KnowledgeBaseMutation().UpdateKnowledgeBase(rctx, obj, fc.Args["input"].(*UpdateKnowledgeBaseInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*DatasourceMutation) + res := resTmp.(*KnowledgeBase) fc.Result = res - return ec.marshalODatasourceMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasourceMutation(ctx, field.Selections, res) + return ec.marshalNKnowledgeBase2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐKnowledgeBase(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_Datasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBaseMutation_updateKnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "KnowledgeBaseMutation", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "createDatasource": - return ec.fieldContext_DatasourceMutation_createDatasource(ctx, field) - case "updateDatasource": - return ec.fieldContext_DatasourceMutation_updateDatasource(ctx, field) - case "deleteDatasource": - return ec.fieldContext_DatasourceMutation_deleteDatasource(ctx, field) + case "name": + return ec.fieldContext_KnowledgeBase_name(ctx, field) + case "namespace": + return ec.fieldContext_KnowledgeBase_namespace(ctx, field) + case "labels": + return ec.fieldContext_KnowledgeBase_labels(ctx, field) + case "annotations": + return ec.fieldContext_KnowledgeBase_annotations(ctx, field) + case "creator": + return ec.fieldContext_KnowledgeBase_creator(ctx, field) + case "displayName": + return ec.fieldContext_KnowledgeBase_displayName(ctx, field) + case "description": + return ec.fieldContext_KnowledgeBase_description(ctx, field) + case "embedder": + return ec.fieldContext_KnowledgeBase_embedder(ctx, field) + case "vectorStore": + return ec.fieldContext_KnowledgeBase_vectorStore(ctx, field) + case "fileGroups": + return ec.fieldContext_KnowledgeBase_fileGroups(ctx, field) + case "status": + return ec.fieldContext_KnowledgeBase_status(ctx, field) + case "updateTimestamp": + return ec.fieldContext_KnowledgeBase_updateTimestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type DatasourceMutation", field.Name) + return nil, fmt.Errorf("no field named %q was found under type KnowledgeBase", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_KnowledgeBaseMutation_updateKnowledgeBase_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Mutation_Embedder(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_Embedder(ctx, field) +func (ec *executionContext) _KnowledgeBaseMutation_deleteKnowledgeBase(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBaseMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBaseMutation_deleteKnowledgeBase(ctx, field) if err != nil { return graphql.Null } @@ -5568,7 +6521,7 @@ func (ec *executionContext) _Mutation_Embedder(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().Embedder(rctx) + return ec.resolvers.KnowledgeBaseMutation().DeleteKnowledgeBase(rctx, obj, fc.Args["input"].(*DeleteKnowledgeBaseInput)) }) if err != nil { ec.Error(ctx, err) @@ -5577,34 +6530,37 @@ func (ec *executionContext) _Mutation_Embedder(ctx context.Context, field graphq if resTmp == nil { return graphql.Null } - res := resTmp.(*EmbedderMutation) + res := resTmp.(*string) fc.Result = res - return ec.marshalOEmbedderMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEmbedderMutation(ctx, field.Selections, res) + return ec.marshalOVoid2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_Embedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBaseMutation_deleteKnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "KnowledgeBaseMutation", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "createEmbedder": - return ec.fieldContext_EmbedderMutation_createEmbedder(ctx, field) - case "updateEmbedder": - return ec.fieldContext_EmbedderMutation_updateEmbedder(ctx, field) - case "deleteEmbedder": - return ec.fieldContext_EmbedderMutation_deleteEmbedder(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type EmbedderMutation", field.Name) + return nil, errors.New("field of type Void does not have child fields") }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_KnowledgeBaseMutation_deleteKnowledgeBase_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Mutation_KnowledgeBase(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_KnowledgeBase(ctx, field) +func (ec *executionContext) _KnowledgeBaseQuery_getKnowledgeBase(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBaseQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBaseQuery_getKnowledgeBase(ctx, field) if err != nil { return graphql.Null } @@ -5617,43 +6573,75 @@ func (ec *executionContext) _Mutation_KnowledgeBase(ctx context.Context, field g }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().KnowledgeBase(rctx) + return ec.resolvers.KnowledgeBaseQuery().GetKnowledgeBase(rctx, obj, fc.Args["name"].(string), fc.Args["namespace"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*KnowledgeBaseMutation) + res := resTmp.(*KnowledgeBase) fc.Result = res - return ec.marshalOKnowledgeBaseMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐKnowledgeBaseMutation(ctx, field.Selections, res) + return ec.marshalNKnowledgeBase2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐKnowledgeBase(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_KnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBaseQuery_getKnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "KnowledgeBaseQuery", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "createKnowledgeBase": - return ec.fieldContext_KnowledgeBaseMutation_createKnowledgeBase(ctx, field) - case "updateKnowledgeBase": - return ec.fieldContext_KnowledgeBaseMutation_updateKnowledgeBase(ctx, field) - case "deleteKnowledgeBase": - return ec.fieldContext_KnowledgeBaseMutation_deleteKnowledgeBase(ctx, field) + case "name": + return ec.fieldContext_KnowledgeBase_name(ctx, field) + case "namespace": + return ec.fieldContext_KnowledgeBase_namespace(ctx, field) + case "labels": + return ec.fieldContext_KnowledgeBase_labels(ctx, field) + case "annotations": + return ec.fieldContext_KnowledgeBase_annotations(ctx, field) + case "creator": + return ec.fieldContext_KnowledgeBase_creator(ctx, field) + case "displayName": + return ec.fieldContext_KnowledgeBase_displayName(ctx, field) + case "description": + return ec.fieldContext_KnowledgeBase_description(ctx, field) + case "embedder": + return ec.fieldContext_KnowledgeBase_embedder(ctx, field) + case "vectorStore": + return ec.fieldContext_KnowledgeBase_vectorStore(ctx, field) + case "fileGroups": + return ec.fieldContext_KnowledgeBase_fileGroups(ctx, field) + case "status": + return ec.fieldContext_KnowledgeBase_status(ctx, field) + case "updateTimestamp": + return ec.fieldContext_KnowledgeBase_updateTimestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type KnowledgeBaseMutation", field.Name) + return nil, fmt.Errorf("no field named %q was found under type KnowledgeBase", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_KnowledgeBaseQuery_getKnowledgeBase_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Mutation_Model(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Mutation_Model(ctx, field) +func (ec *executionContext) _KnowledgeBaseQuery_listKnowledgeBases(ctx context.Context, field graphql.CollectedField, obj *KnowledgeBaseQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_KnowledgeBaseQuery_listKnowledgeBases(ctx, field) if err != nil { return graphql.Null } @@ -5666,43 +6654,61 @@ func (ec *executionContext) _Mutation_Model(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Mutation().Model(rctx) + return ec.resolvers.KnowledgeBaseQuery().ListKnowledgeBases(rctx, obj, fc.Args["input"].(ListKnowledgeBaseInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ModelMutation) + res := resTmp.(*PaginatedResult) fc.Result = res - return ec.marshalOModelMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐModelMutation(ctx, field.Selections, res) + return ec.marshalNPaginatedResult2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPaginatedResult(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Mutation_Model(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_KnowledgeBaseQuery_listKnowledgeBases(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Mutation", + Object: "KnowledgeBaseQuery", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "createModel": - return ec.fieldContext_ModelMutation_createModel(ctx, field) - case "updateModel": - return ec.fieldContext_ModelMutation_updateModel(ctx, field) - case "deleteModel": - return ec.fieldContext_ModelMutation_deleteModel(ctx, field) + case "hasNextPage": + return ec.fieldContext_PaginatedResult_hasNextPage(ctx, field) + case "nodes": + return ec.fieldContext_PaginatedResult_nodes(ctx, field) + case "page": + return ec.fieldContext_PaginatedResult_page(ctx, field) + case "pageSize": + return ec.fieldContext_PaginatedResult_pageSize(ctx, field) + case "totalCount": + return ec.fieldContext_PaginatedResult_totalCount(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ModelMutation", field.Name) + return nil, fmt.Errorf("no field named %q was found under type PaginatedResult", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_KnowledgeBaseQuery_listKnowledgeBases_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Oss_bucket(ctx context.Context, field graphql.CollectedField, obj *Oss) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Oss_bucket(ctx, field) +func (ec *executionContext) _Model_name(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Model_name(ctx, field) if err != nil { return graphql.Null } @@ -5715,23 +6721,26 @@ func (ec *executionContext) _Oss_bucket(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Bucket, nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Oss_bucket(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Model_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Oss", + Object: "Model", Field: field, IsMethod: false, IsResolver: false, @@ -5742,8 +6751,8 @@ func (ec *executionContext) fieldContext_Oss_bucket(ctx context.Context, field g return fc, nil } -func (ec *executionContext) _Oss_Object(ctx context.Context, field graphql.CollectedField, obj *Oss) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Oss_Object(ctx, field) +func (ec *executionContext) _Model_namespace(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Model_namespace(ctx, field) if err != nil { return graphql.Null } @@ -5756,23 +6765,26 @@ func (ec *executionContext) _Oss_Object(ctx context.Context, field graphql.Colle }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Object, nil + return obj.Namespace, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(string) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Oss_Object(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Model_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Oss", + Object: "Model", Field: field, IsMethod: false, IsResolver: false, @@ -5783,8 +6795,8 @@ func (ec *executionContext) fieldContext_Oss_Object(ctx context.Context, field g return fc, nil } -func (ec *executionContext) _PaginatedResult_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *PaginatedResult) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaginatedResult_hasNextPage(ctx, field) +func (ec *executionContext) _Model_labels(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Model_labels(ctx, field) if err != nil { return graphql.Null } @@ -5797,38 +6809,35 @@ func (ec *executionContext) _PaginatedResult_hasNextPage(ctx context.Context, fi }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.HasNextPage, nil + return obj.Labels, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(map[string]interface{}) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaginatedResult_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Model_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaginatedResult", + Object: "Model", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type Map does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PaginatedResult_nodes(ctx context.Context, field graphql.CollectedField, obj *PaginatedResult) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaginatedResult_nodes(ctx, field) +func (ec *executionContext) _Model_annotations(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Model_annotations(ctx, field) if err != nil { return graphql.Null } @@ -5841,7 +6850,7 @@ func (ec *executionContext) _PaginatedResult_nodes(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Nodes, nil + return obj.Annotations, nil }) if err != nil { ec.Error(ctx, err) @@ -5850,26 +6859,26 @@ func (ec *executionContext) _PaginatedResult_nodes(ctx context.Context, field gr if resTmp == nil { return graphql.Null } - res := resTmp.([]PageNode) + res := resTmp.(map[string]interface{}) fc.Result = res - return ec.marshalOPageNode2ᚕgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPageNodeᚄ(ctx, field.Selections, res) + return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaginatedResult_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Model_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaginatedResult", + Object: "Model", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type PageNode does not have child fields") + return nil, errors.New("field of type Map does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PaginatedResult_page(ctx context.Context, field graphql.CollectedField, obj *PaginatedResult) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaginatedResult_page(ctx, field) +func (ec *executionContext) _Model_creator(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Model_creator(ctx, field) if err != nil { return graphql.Null } @@ -5882,7 +6891,7 @@ func (ec *executionContext) _PaginatedResult_page(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Page, nil + return obj.Creator, nil }) if err != nil { ec.Error(ctx, err) @@ -5891,26 +6900,26 @@ func (ec *executionContext) _PaginatedResult_page(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.(*int) + res := resTmp.(*string) fc.Result = res - return ec.marshalOInt2ᚖint(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaginatedResult_page(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Model_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaginatedResult", + Object: "Model", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PaginatedResult_pageSize(ctx context.Context, field graphql.CollectedField, obj *PaginatedResult) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaginatedResult_pageSize(ctx, field) +func (ec *executionContext) _Model_displayName(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Model_displayName(ctx, field) if err != nil { return graphql.Null } @@ -5923,35 +6932,38 @@ func (ec *executionContext) _PaginatedResult_pageSize(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PageSize, nil + return obj.DisplayName, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*int) + res := resTmp.(string) fc.Result = res - return ec.marshalOInt2ᚖint(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaginatedResult_pageSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Model_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaginatedResult", + Object: "Model", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _PaginatedResult_totalCount(ctx context.Context, field graphql.CollectedField, obj *PaginatedResult) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_PaginatedResult_totalCount(ctx, field) +func (ec *executionContext) _Model_description(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Model_description(ctx, field) if err != nil { return graphql.Null } @@ -5964,38 +6976,35 @@ func (ec *executionContext) _PaginatedResult_totalCount(ctx context.Context, fie }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.TotalCount, nil + return obj.Description, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(int) + res := resTmp.(*string) fc.Result = res - return ec.marshalNInt2int(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_PaginatedResult_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Model_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "PaginatedResult", + Object: "Model", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Int does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Query_hello(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_hello(ctx, field) +func (ec *executionContext) _Model_field(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Model_field(ctx, field) if err != nil { return graphql.Null } @@ -6008,7 +7017,7 @@ func (ec *executionContext) _Query_hello(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Hello(rctx, fc.Args["name"].(string)) + return obj.Field, nil }) if err != nil { ec.Error(ctx, err) @@ -6025,32 +7034,21 @@ func (ec *executionContext) _Query_hello(ctx context.Context, field graphql.Coll return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_hello(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Model_field(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Model", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query_hello_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) _Query_Datasource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_Datasource(ctx, field) +func (ec *executionContext) _Model_modeltype(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Model_modeltype(ctx, field) if err != nil { return graphql.Null } @@ -6063,41 +7061,38 @@ func (ec *executionContext) _Query_Datasource(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Datasource(rctx) + return obj.Modeltype, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*DatasourceQuery) + res := resTmp.(string) fc.Result = res - return ec.marshalODatasourceQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasourceQuery(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_Datasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Model_modeltype(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Model", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "getDatasource": - return ec.fieldContext_DatasourceQuery_getDatasource(ctx, field) - case "listDatasources": - return ec.fieldContext_DatasourceQuery_listDatasources(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type DatasourceQuery", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Query_Embedder(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_Embedder(ctx, field) +func (ec *executionContext) _Model_updateTimestamp(ctx context.Context, field graphql.CollectedField, obj *Model) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Model_updateTimestamp(ctx, field) if err != nil { return graphql.Null } @@ -6110,7 +7105,7 @@ func (ec *executionContext) _Query_Embedder(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Embedder(rctx) + return obj.UpdateTimestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -6119,32 +7114,26 @@ func (ec *executionContext) _Query_Embedder(ctx context.Context, field graphql.C if resTmp == nil { return graphql.Null } - res := resTmp.(*EmbedderQuery) + res := resTmp.(*time.Time) fc.Result = res - return ec.marshalOEmbedderQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEmbedderQuery(ctx, field.Selections, res) + return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_Embedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Model_updateTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "Model", Field: field, - IsMethod: true, - IsResolver: true, + IsMethod: false, + IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "getEmbedder": - return ec.fieldContext_EmbedderQuery_getEmbedder(ctx, field) - case "listEmbedders": - return ec.fieldContext_EmbedderQuery_listEmbedders(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type EmbedderQuery", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) _Query_KnowledgeBase(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_KnowledgeBase(ctx, field) +func (ec *executionContext) _ModelMutation_createModel(ctx context.Context, field graphql.CollectedField, obj *ModelMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ModelMutation_createModel(ctx, field) if err != nil { return graphql.Null } @@ -6157,41 +7146,71 @@ func (ec *executionContext) _Query_KnowledgeBase(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().KnowledgeBase(rctx) + return ec.resolvers.ModelMutation().CreateModel(rctx, obj, fc.Args["input"].(CreateModelInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*KnowledgeBaseQuery) + res := resTmp.(*Model) fc.Result = res - return ec.marshalOKnowledgeBaseQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐKnowledgeBaseQuery(ctx, field.Selections, res) + return ec.marshalNModel2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐModel(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_KnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ModelMutation_createModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ModelMutation", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "getKnowledgeBase": - return ec.fieldContext_KnowledgeBaseQuery_getKnowledgeBase(ctx, field) - case "listKnowledgeBases": - return ec.fieldContext_KnowledgeBaseQuery_listKnowledgeBases(ctx, field) + case "name": + return ec.fieldContext_Model_name(ctx, field) + case "namespace": + return ec.fieldContext_Model_namespace(ctx, field) + case "labels": + return ec.fieldContext_Model_labels(ctx, field) + case "annotations": + return ec.fieldContext_Model_annotations(ctx, field) + case "creator": + return ec.fieldContext_Model_creator(ctx, field) + case "displayName": + return ec.fieldContext_Model_displayName(ctx, field) + case "description": + return ec.fieldContext_Model_description(ctx, field) + case "field": + return ec.fieldContext_Model_field(ctx, field) + case "modeltype": + return ec.fieldContext_Model_modeltype(ctx, field) + case "updateTimestamp": + return ec.fieldContext_Model_updateTimestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type KnowledgeBaseQuery", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Model", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_ModelMutation_createModel_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Query_Model(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query_Model(ctx, field) +func (ec *executionContext) _ModelMutation_updateModel(ctx context.Context, field graphql.CollectedField, obj *ModelMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ModelMutation_updateModel(ctx, field) if err != nil { return graphql.Null } @@ -6204,41 +7223,71 @@ func (ec *executionContext) _Query_Model(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.resolvers.Query().Model(rctx) + return ec.resolvers.ModelMutation().UpdateModel(rctx, obj, fc.Args["input"].(*UpdateModelInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*ModelQuery) + res := resTmp.(*Model) fc.Result = res - return ec.marshalOModelQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐModelQuery(ctx, field.Selections, res) + return ec.marshalNModel2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐModel(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query_Model(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ModelMutation_updateModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ModelMutation", Field: field, IsMethod: true, IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "getModel": - return ec.fieldContext_ModelQuery_getModel(ctx, field) - case "listModels": - return ec.fieldContext_ModelQuery_listModels(ctx, field) + case "name": + return ec.fieldContext_Model_name(ctx, field) + case "namespace": + return ec.fieldContext_Model_namespace(ctx, field) + case "labels": + return ec.fieldContext_Model_labels(ctx, field) + case "annotations": + return ec.fieldContext_Model_annotations(ctx, field) + case "creator": + return ec.fieldContext_Model_creator(ctx, field) + case "displayName": + return ec.fieldContext_Model_displayName(ctx, field) + case "description": + return ec.fieldContext_Model_description(ctx, field) + case "field": + return ec.fieldContext_Model_field(ctx, field) + case "modeltype": + return ec.fieldContext_Model_modeltype(ctx, field) + case "updateTimestamp": + return ec.fieldContext_Model_updateTimestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type ModelQuery", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Model", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_ModelMutation_updateModel_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query___type(ctx, field) +func (ec *executionContext) _ModelMutation_deleteModel(ctx context.Context, field graphql.CollectedField, obj *ModelMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ModelMutation_deleteModel(ctx, field) if err != nil { return graphql.Null } @@ -6251,7 +7300,7 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.introspectType(fc.Args["name"].(string)) + return ec.resolvers.ModelMutation().DeleteModel(rctx, obj, fc.Args["input"].(*DeleteModelInput)) }) if err != nil { ec.Error(ctx, err) @@ -6260,41 +7309,19 @@ func (ec *executionContext) _Query___type(ctx context.Context, field graphql.Col if resTmp == nil { return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(*string) fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalOVoid2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ModelMutation_deleteModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ModelMutation", Field: field, IsMethod: true, - IsResolver: false, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type Void does not have child fields") }, } defer func() { @@ -6304,15 +7331,15 @@ func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field } }() ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + if fc.Args, err = ec.field_ModelMutation_deleteModel_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { ec.Error(ctx, err) return fc, err } return fc, nil } -func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_Query___schema(ctx, field) +func (ec *executionContext) _ModelQuery_getModel(ctx context.Context, field graphql.CollectedField, obj *ModelQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ModelQuery_getModel(ctx, field) if err != nil { return graphql.Null } @@ -6325,49 +7352,71 @@ func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return ec.introspectSchema() + return ec.resolvers.ModelQuery().GetModel(rctx, obj, fc.Args["name"].(string), fc.Args["namespace"].(string)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*introspection.Schema) + res := resTmp.(*Model) fc.Result = res - return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) + return ec.marshalNModel2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐModel(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ModelQuery_getModel(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "Query", + Object: "ModelQuery", Field: field, IsMethod: true, - IsResolver: false, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { + case "name": + return ec.fieldContext_Model_name(ctx, field) + case "namespace": + return ec.fieldContext_Model_namespace(ctx, field) + case "labels": + return ec.fieldContext_Model_labels(ctx, field) + case "annotations": + return ec.fieldContext_Model_annotations(ctx, field) + case "creator": + return ec.fieldContext_Model_creator(ctx, field) + case "displayName": + return ec.fieldContext_Model_displayName(ctx, field) case "description": - return ec.fieldContext___Schema_description(ctx, field) - case "types": - return ec.fieldContext___Schema_types(ctx, field) - case "queryType": - return ec.fieldContext___Schema_queryType(ctx, field) - case "mutationType": - return ec.fieldContext___Schema_mutationType(ctx, field) - case "subscriptionType": - return ec.fieldContext___Schema_subscriptionType(ctx, field) - case "directives": - return ec.fieldContext___Schema_directives(ctx, field) + return ec.fieldContext_Model_description(ctx, field) + case "field": + return ec.fieldContext_Model_field(ctx, field) + case "modeltype": + return ec.fieldContext_Model_modeltype(ctx, field) + case "updateTimestamp": + return ec.fieldContext_Model_updateTimestamp(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) + return nil, fmt.Errorf("no field named %q was found under type Model", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_ModelQuery_getModel_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _TypedObjectReference_apiGroup(ctx context.Context, field graphql.CollectedField, obj *TypedObjectReference) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) +func (ec *executionContext) _ModelQuery_listModels(ctx context.Context, field graphql.CollectedField, obj *ModelQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_ModelQuery_listModels(ctx, field) if err != nil { return graphql.Null } @@ -6380,35 +7429,61 @@ func (ec *executionContext) _TypedObjectReference_apiGroup(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.APIGroup, nil + return ec.resolvers.ModelQuery().ListModels(rctx, obj, fc.Args["input"].(ListModelInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*PaginatedResult) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNPaginatedResult2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPaginatedResult(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TypedObjectReference_apiGroup(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_ModelQuery_listModels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TypedObjectReference", + Object: "ModelQuery", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PaginatedResult_hasNextPage(ctx, field) + case "nodes": + return ec.fieldContext_PaginatedResult_nodes(ctx, field) + case "page": + return ec.fieldContext_PaginatedResult_page(ctx, field) + case "pageSize": + return ec.fieldContext_PaginatedResult_pageSize(ctx, field) + case "totalCount": + return ec.fieldContext_PaginatedResult_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PaginatedResult", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_ModelQuery_listModels_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) _TypedObjectReference_kind(ctx context.Context, field graphql.CollectedField, obj *TypedObjectReference) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TypedObjectReference_kind(ctx, field) +func (ec *executionContext) _Mutation_hello(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_hello(ctx, field) if err != nil { return graphql.Null } @@ -6421,7 +7496,7 @@ func (ec *executionContext) _TypedObjectReference_kind(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Kind, nil + return ec.resolvers.Mutation().Hello(rctx, fc.Args["name"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -6438,21 +7513,32 @@ func (ec *executionContext) _TypedObjectReference_kind(ctx context.Context, fiel return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TypedObjectReference_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_hello(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TypedObjectReference", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") }, } - return fc, nil -} - -func (ec *executionContext) _TypedObjectReference_Name(ctx context.Context, field graphql.CollectedField, obj *TypedObjectReference) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TypedObjectReference_Name(ctx, field) + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Mutation_hello_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _Mutation_Dataset(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_Dataset(ctx, field) if err != nil { return graphql.Null } @@ -6465,38 +7551,43 @@ func (ec *executionContext) _TypedObjectReference_Name(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return ec.resolvers.Mutation().Dataset(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*DatasetMutation) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalODatasetMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasetMutation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TypedObjectReference_Name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_Dataset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TypedObjectReference", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "createDataset": + return ec.fieldContext_DatasetMutation_createDataset(ctx, field) + case "updateDataset": + return ec.fieldContext_DatasetMutation_updateDataset(ctx, field) + case "deleteDatasets": + return ec.fieldContext_DatasetMutation_deleteDatasets(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DatasetMutation", field.Name) }, } return fc, nil } -func (ec *executionContext) _TypedObjectReference_Namespace(ctx context.Context, field graphql.CollectedField, obj *TypedObjectReference) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_TypedObjectReference_Namespace(ctx, field) +func (ec *executionContext) _Mutation_Datasource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_Datasource(ctx, field) if err != nil { return graphql.Null } @@ -6509,7 +7600,7 @@ func (ec *executionContext) _TypedObjectReference_Namespace(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Namespace, nil + return ec.resolvers.Mutation().Datasource(rctx) }) if err != nil { ec.Error(ctx, err) @@ -6518,26 +7609,34 @@ func (ec *executionContext) _TypedObjectReference_Namespace(ctx context.Context, if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*DatasourceMutation) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalODatasourceMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasourceMutation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_TypedObjectReference_Namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_Datasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "TypedObjectReference", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "createDatasource": + return ec.fieldContext_DatasourceMutation_createDatasource(ctx, field) + case "updateDatasource": + return ec.fieldContext_DatasourceMutation_updateDatasource(ctx, field) + case "deleteDatasource": + return ec.fieldContext_DatasourceMutation_deleteDatasource(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DatasourceMutation", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_name(ctx, field) +func (ec *executionContext) _Mutation_Embedder(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_Embedder(ctx, field) if err != nil { return graphql.Null } @@ -6550,38 +7649,43 @@ func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return ec.resolvers.Mutation().Embedder(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*EmbedderMutation) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOEmbedderMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEmbedderMutation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_Embedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Directive", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "createEmbedder": + return ec.fieldContext_EmbedderMutation_createEmbedder(ctx, field) + case "updateEmbedder": + return ec.fieldContext_EmbedderMutation_updateEmbedder(ctx, field) + case "deleteEmbedder": + return ec.fieldContext_EmbedderMutation_deleteEmbedder(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EmbedderMutation", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_description(ctx, field) +func (ec *executionContext) _Mutation_KnowledgeBase(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_KnowledgeBase(ctx, field) if err != nil { return graphql.Null } @@ -6594,7 +7698,7 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description(), nil + return ec.resolvers.Mutation().KnowledgeBase(rctx) }) if err != nil { ec.Error(ctx, err) @@ -6603,26 +7707,34 @@ func (ec *executionContext) ___Directive_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*KnowledgeBaseMutation) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOKnowledgeBaseMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐKnowledgeBaseMutation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_KnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Directive", + Object: "Mutation", Field: field, IsMethod: true, - IsResolver: false, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "createKnowledgeBase": + return ec.fieldContext_KnowledgeBaseMutation_createKnowledgeBase(ctx, field) + case "updateKnowledgeBase": + return ec.fieldContext_KnowledgeBaseMutation_updateKnowledgeBase(ctx, field) + case "deleteKnowledgeBase": + return ec.fieldContext_KnowledgeBaseMutation_deleteKnowledgeBase(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type KnowledgeBaseMutation", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_locations(ctx, field) +func (ec *executionContext) _Mutation_Model(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_Model(ctx, field) if err != nil { return graphql.Null } @@ -6635,38 +7747,43 @@ func (ec *executionContext) ___Directive_locations(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Locations, nil + return ec.resolvers.Mutation().Model(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(*ModelMutation) fc.Result = res - return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalOModelMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐModelMutation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_Model(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Directive", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type __DirectiveLocation does not have child fields") + switch field.Name { + case "createModel": + return ec.fieldContext_ModelMutation_createModel(ctx, field) + case "updateModel": + return ec.fieldContext_ModelMutation_updateModel(ctx, field) + case "deleteModel": + return ec.fieldContext_ModelMutation_deleteModel(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ModelMutation", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_args(ctx, field) +func (ec *executionContext) _Mutation_VersionedDataset(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Mutation_VersionedDataset(ctx, field) if err != nil { return graphql.Null } @@ -6679,48 +7796,43 @@ func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Args, nil + return ec.resolvers.Mutation().VersionedDataset(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.([]introspection.InputValue) + res := resTmp.(*VersionedDatasetMutation) fc.Result = res - return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return ec.marshalOVersionedDatasetMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐVersionedDatasetMutation(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Mutation_VersionedDataset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Directive", + Object: "Mutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "name": - return ec.fieldContext___InputValue_name(ctx, field) - case "description": - return ec.fieldContext___InputValue_description(ctx, field) - case "type": - return ec.fieldContext___InputValue_type(ctx, field) - case "defaultValue": - return ec.fieldContext___InputValue_defaultValue(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + case "createVersionedDataset": + return ec.fieldContext_VersionedDatasetMutation_createVersionedDataset(ctx, field) + case "updateVersionedDataset": + return ec.fieldContext_VersionedDatasetMutation_updateVersionedDataset(ctx, field) + case "deleteVersionedDatasets": + return ec.fieldContext_VersionedDatasetMutation_deleteVersionedDatasets(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type VersionedDatasetMutation", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) +func (ec *executionContext) _Oss_bucket(ctx context.Context, field graphql.CollectedField, obj *Oss) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Oss_bucket(ctx, field) if err != nil { return graphql.Null } @@ -6733,38 +7845,35 @@ func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IsRepeatable, nil + return obj.Bucket, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*string) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Oss_bucket(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Directive", + Object: "Oss", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_name(ctx, field) +func (ec *executionContext) _Oss_Object(ctx context.Context, field graphql.CollectedField, obj *Oss) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Oss_Object(ctx, field) if err != nil { return graphql.Null } @@ -6777,26 +7886,23 @@ func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.Object, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*string) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Oss_Object(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__EnumValue", + Object: "Oss", Field: field, IsMethod: false, IsResolver: false, @@ -6807,8 +7913,8 @@ func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, f return fc, nil } -func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_description(ctx, field) +func (ec *executionContext) _PaginatedResult_hasNextPage(ctx context.Context, field graphql.CollectedField, obj *PaginatedResult) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaginatedResult_hasNextPage(ctx, field) if err != nil { return graphql.Null } @@ -6821,35 +7927,38 @@ func (ec *executionContext) ___EnumValue_description(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description(), nil + return obj.HasNextPage, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(bool) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNBoolean2bool(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaginatedResult_hasNextPage(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__EnumValue", + Object: "PaginatedResult", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Boolean does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) +func (ec *executionContext) _PaginatedResult_nodes(ctx context.Context, field graphql.CollectedField, obj *PaginatedResult) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaginatedResult_nodes(ctx, field) if err != nil { return graphql.Null } @@ -6862,38 +7971,35 @@ func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IsDeprecated(), nil + return obj.Nodes, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.([]PageNode) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalOPageNode2ᚕgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPageNodeᚄ(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaginatedResult_nodes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__EnumValue", + Object: "PaginatedResult", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + return nil, errors.New("field of type PageNode does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) +func (ec *executionContext) _PaginatedResult_page(ctx context.Context, field graphql.CollectedField, obj *PaginatedResult) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaginatedResult_page(ctx, field) if err != nil { return graphql.Null } @@ -6906,7 +8012,7 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DeprecationReason(), nil + return obj.Page, nil }) if err != nil { ec.Error(ctx, err) @@ -6915,26 +8021,26 @@ func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*int) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaginatedResult_page(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__EnumValue", + Object: "PaginatedResult", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_name(ctx, field) +func (ec *executionContext) _PaginatedResult_pageSize(ctx context.Context, field graphql.CollectedField, obj *PaginatedResult) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaginatedResult_pageSize(ctx, field) if err != nil { return graphql.Null } @@ -6947,38 +8053,35 @@ func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return obj.PageSize, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*int) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOInt2ᚖint(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaginatedResult_pageSize(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "PaginatedResult", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_description(ctx, field) +func (ec *executionContext) _PaginatedResult_totalCount(ctx context.Context, field graphql.CollectedField, obj *PaginatedResult) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_PaginatedResult_totalCount(ctx, field) if err != nil { return graphql.Null } @@ -6991,35 +8094,38 @@ func (ec *executionContext) ___Field_description(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description(), nil + return obj.TotalCount, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(int) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_PaginatedResult_totalCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "PaginatedResult", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_args(ctx, field) +func (ec *executionContext) _Query_hello(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_hello(ctx, field) if err != nil { return graphql.Null } @@ -7032,7 +8138,7 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Args, nil + return ec.resolvers.Query().Hello(rctx, fc.Args["name"].(string)) }) if err != nil { ec.Error(ctx, err) @@ -7044,36 +8150,37 @@ func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.Col } return graphql.Null } - res := resTmp.([]introspection.InputValue) + res := resTmp.(string) fc.Result = res - return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_hello(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___InputValue_name(ctx, field) - case "description": - return ec.fieldContext___InputValue_description(ctx, field) - case "type": - return ec.fieldContext___InputValue_type(ctx, field) - case "defaultValue": - return ec.fieldContext___InputValue_defaultValue(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query_hello_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_type(ctx, field) +func (ec *executionContext) _Query_Dataset(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_Dataset(ctx, field) if err != nil { return graphql.Null } @@ -7086,60 +8193,41 @@ func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.Col }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return ec.resolvers.Query().Dataset(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(*DatasetQuery) fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalODatasetQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasetQuery(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_Dataset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) + case "getDataset": + return ec.fieldContext_DatasetQuery_getDataset(ctx, field) + case "listDatasets": + return ec.fieldContext_DatasetQuery_listDatasets(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, fmt.Errorf("no field named %q was found under type DatasetQuery", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) +func (ec *executionContext) _Query_Datasource(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_Datasource(ctx, field) if err != nil { return graphql.Null } @@ -7152,38 +8240,41 @@ func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.IsDeprecated(), nil + return ec.resolvers.Query().Datasource(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(bool) + res := resTmp.(*DatasourceQuery) fc.Result = res - return ec.marshalNBoolean2bool(ctx, field.Selections, res) + return ec.marshalODatasourceQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasourceQuery(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_Datasource(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "Query", Field: field, IsMethod: true, - IsResolver: false, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type Boolean does not have child fields") + switch field.Name { + case "getDatasource": + return ec.fieldContext_DatasourceQuery_getDatasource(ctx, field) + case "listDatasources": + return ec.fieldContext_DatasourceQuery_listDatasources(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type DatasourceQuery", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) +func (ec *executionContext) _Query_Embedder(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_Embedder(ctx, field) if err != nil { return graphql.Null } @@ -7196,7 +8287,7 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DeprecationReason(), nil + return ec.resolvers.Query().Embedder(rctx) }) if err != nil { ec.Error(ctx, err) @@ -7205,26 +8296,32 @@ func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*EmbedderQuery) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOEmbedderQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEmbedderQuery(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_Embedder(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Field", + Object: "Query", Field: field, IsMethod: true, - IsResolver: false, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "getEmbedder": + return ec.fieldContext_EmbedderQuery_getEmbedder(ctx, field) + case "listEmbedders": + return ec.fieldContext_EmbedderQuery_listEmbedders(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type EmbedderQuery", field.Name) }, } return fc, nil } -func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_name(ctx, field) +func (ec *executionContext) _Query_KnowledgeBase(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_KnowledgeBase(ctx, field) if err != nil { return graphql.Null } @@ -7237,38 +8334,41 @@ func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name, nil + return ec.resolvers.Query().KnowledgeBase(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(*KnowledgeBaseQuery) fc.Result = res - return ec.marshalNString2string(ctx, field.Selections, res) + return ec.marshalOKnowledgeBaseQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐKnowledgeBaseQuery(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_KnowledgeBase(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__InputValue", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "getKnowledgeBase": + return ec.fieldContext_KnowledgeBaseQuery_getKnowledgeBase(ctx, field) + case "listKnowledgeBases": + return ec.fieldContext_KnowledgeBaseQuery_listKnowledgeBases(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type KnowledgeBaseQuery", field.Name) }, } return fc, nil } -func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_description(ctx, field) +func (ec *executionContext) _Query_Model(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_Model(ctx, field) if err != nil { return graphql.Null } @@ -7281,7 +8381,7 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description(), nil + return ec.resolvers.Query().Model(rctx) }) if err != nil { ec.Error(ctx, err) @@ -7290,26 +8390,32 @@ func (ec *executionContext) ___InputValue_description(ctx context.Context, field if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*ModelQuery) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOModelQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐModelQuery(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_Model(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__InputValue", + Object: "Query", Field: field, IsMethod: true, - IsResolver: false, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "getModel": + return ec.fieldContext_ModelQuery_getModel(ctx, field) + case "listModels": + return ec.fieldContext_ModelQuery_listModels(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type ModelQuery", field.Name) }, } return fc, nil } -func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_type(ctx, field) +func (ec *executionContext) _Query_VersionedDataset(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query_VersionedDataset(ctx, field) if err != nil { return graphql.Null } @@ -7322,40 +8428,84 @@ func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Type, nil + return ec.resolvers.Query().VersionedDataset(rctx) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(*VersionedDatasetQuery) fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalOVersionedDatasetQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐVersionedDatasetQuery(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query_VersionedDataset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__InputValue", + Object: "Query", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": + case "getVersionedDataset": + return ec.fieldContext_VersionedDatasetQuery_getVersionedDataset(ctx, field) + case "listVersionedDatasets": + return ec.fieldContext_VersionedDatasetQuery_listVersionedDatasets(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type VersionedDatasetQuery", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.introspectType(fc.Args["name"].(string)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_Query___type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "Query", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": return ec.fieldContext___Type_interfaces(ctx, field) case "possibleTypes": return ec.fieldContext___Type_possibleTypes(ctx, field) @@ -7371,11 +8521,22 @@ func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_Query___type_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) +func (ec *executionContext) _Query___schema(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_Query___schema(ctx, field) if err != nil { return graphql.Null } @@ -7388,7 +8549,7 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.DefaultValue, nil + return ec.introspectSchema() }) if err != nil { ec.Error(ctx, err) @@ -7397,26 +8558,40 @@ func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, fiel if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(*introspection.Schema) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalO__Schema2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐSchema(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_Query___schema(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__InputValue", + Object: "Query", Field: field, - IsMethod: false, + IsMethod: true, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "description": + return ec.fieldContext___Schema_description(ctx, field) + case "types": + return ec.fieldContext___Schema_types(ctx, field) + case "queryType": + return ec.fieldContext___Schema_queryType(ctx, field) + case "mutationType": + return ec.fieldContext___Schema_mutationType(ctx, field) + case "subscriptionType": + return ec.fieldContext___Schema_subscriptionType(ctx, field) + case "directives": + return ec.fieldContext___Schema_directives(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Schema", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_description(ctx, field) +func (ec *executionContext) _TypedObjectReference_apiGroup(ctx context.Context, field graphql.CollectedField, obj *TypedObjectReference) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) if err != nil { return graphql.Null } @@ -7429,7 +8604,7 @@ func (ec *executionContext) ___Schema_description(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description(), nil + return obj.APIGroup, nil }) if err != nil { ec.Error(ctx, err) @@ -7443,11 +8618,11 @@ func (ec *executionContext) ___Schema_description(ctx context.Context, field gra return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TypedObjectReference_apiGroup(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "TypedObjectReference", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") @@ -7456,8 +8631,8 @@ func (ec *executionContext) fieldContext___Schema_description(ctx context.Contex return fc, nil } -func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_types(ctx, field) +func (ec *executionContext) _TypedObjectReference_kind(ctx context.Context, field graphql.CollectedField, obj *TypedObjectReference) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TypedObjectReference_kind(ctx, field) if err != nil { return graphql.Null } @@ -7470,7 +8645,7 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Types(), nil + return obj.Kind, nil }) if err != nil { ec.Error(ctx, err) @@ -7482,48 +8657,26 @@ func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.C } return graphql.Null } - res := resTmp.([]introspection.Type) + res := resTmp.(string) fc.Result = res - return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TypedObjectReference_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "TypedObjectReference", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_queryType(ctx, field) +func (ec *executionContext) _TypedObjectReference_Name(ctx context.Context, field graphql.CollectedField, obj *TypedObjectReference) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TypedObjectReference_Name(ctx, field) if err != nil { return graphql.Null } @@ -7536,7 +8689,7 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.QueryType(), nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) @@ -7548,48 +8701,26 @@ func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graph } return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(string) fc.Result = res - return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TypedObjectReference_Name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "TypedObjectReference", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_mutationType(ctx, field) +func (ec *executionContext) _TypedObjectReference_Namespace(ctx context.Context, field graphql.CollectedField, obj *TypedObjectReference) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_TypedObjectReference_Namespace(ctx, field) if err != nil { return graphql.Null } @@ -7602,7 +8733,7 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.MutationType(), nil + return obj.Namespace, nil }) if err != nil { ec.Error(ctx, err) @@ -7611,48 +8742,26 @@ func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field gr if resTmp == nil { return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(*string) fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_TypedObjectReference_Namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "TypedObjectReference", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) +func (ec *executionContext) _VersionedDataset_name(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_name(ctx, field) if err != nil { return graphql.Null } @@ -7665,57 +8774,38 @@ func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, fiel }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SubscriptionType(), nil + return obj.Name, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(string) fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "VersionedDataset", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Schema_directives(ctx, field) +func (ec *executionContext) _VersionedDataset_namespace(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_namespace(ctx, field) if err != nil { return graphql.Null } @@ -7728,7 +8818,7 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Directives(), nil + return obj.Namespace, nil }) if err != nil { ec.Error(ctx, err) @@ -7740,38 +8830,26 @@ func (ec *executionContext) ___Schema_directives(ctx context.Context, field grap } return graphql.Null } - res := resTmp.([]introspection.Directive) + res := resTmp.(string) fc.Result = res - return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_namespace(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Schema", + Object: "VersionedDataset", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___Directive_name(ctx, field) - case "description": - return ec.fieldContext___Directive_description(ctx, field) - case "locations": - return ec.fieldContext___Directive_locations(ctx, field) - case "args": - return ec.fieldContext___Directive_args(ctx, field) - case "isRepeatable": - return ec.fieldContext___Directive_isRepeatable(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_kind(ctx, field) +func (ec *executionContext) _VersionedDataset_labels(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_labels(ctx, field) if err != nil { return graphql.Null } @@ -7784,38 +8862,35 @@ func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Kind(), nil + return obj.Labels, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { - if !graphql.HasFieldError(ctx, fc) { - ec.Errorf(ctx, "must not be null") - } return graphql.Null } - res := resTmp.(string) + res := resTmp.(map[string]interface{}) fc.Result = res - return ec.marshalN__TypeKind2string(ctx, field.Selections, res) + return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_labels(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "VersionedDataset", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type __TypeKind does not have child fields") + return nil, errors.New("field of type Map does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_name(ctx, field) +func (ec *executionContext) _VersionedDataset_annotations(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_annotations(ctx, field) if err != nil { return graphql.Null } @@ -7828,7 +8903,7 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Name(), nil + return obj.Annotations, nil }) if err != nil { ec.Error(ctx, err) @@ -7837,26 +8912,26 @@ func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.Coll if resTmp == nil { return graphql.Null } - res := resTmp.(*string) + res := resTmp.(map[string]interface{}) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalOMap2map(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_annotations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "VersionedDataset", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Map does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_description(ctx, field) +func (ec *executionContext) _VersionedDataset_creator(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_creator(ctx, field) if err != nil { return graphql.Null } @@ -7869,7 +8944,7 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Description(), nil + return obj.Creator, nil }) if err != nil { ec.Error(ctx, err) @@ -7883,11 +8958,11 @@ func (ec *executionContext) ___Type_description(ctx context.Context, field graph return ec.marshalOString2ᚖstring(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_creator(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "VersionedDataset", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { return nil, errors.New("field of type String does not have child fields") @@ -7896,8 +8971,8 @@ func (ec *executionContext) fieldContext___Type_description(ctx context.Context, return fc, nil } -func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_fields(ctx, field) +func (ec *executionContext) _VersionedDataset_displayName(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_displayName(ctx, field) if err != nil { return graphql.Null } @@ -7910,60 +8985,38 @@ func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil + return obj.DisplayName, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]introspection.Field) + res := resTmp.(string) fc.Result = res - return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_displayName(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "VersionedDataset", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___Field_name(ctx, field) - case "description": - return ec.fieldContext___Field_description(ctx, field) - case "args": - return ec.fieldContext___Field_args(ctx, field) - case "type": - return ec.fieldContext___Field_type(ctx, field) - case "isDeprecated": - return ec.fieldContext___Field_isDeprecated(ctx, field) - case "deprecationReason": - return ec.fieldContext___Field_deprecationReason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_interfaces(ctx, field) +func (ec *executionContext) _VersionedDataset_dataset(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_dataset(ctx, field) if err != nil { return graphql.Null } @@ -7976,57 +9029,48 @@ func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Interfaces(), nil + return obj.Dataset, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]introspection.Type) + res := resTmp.(TypedObjectReference) fc.Result = res - return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return ec.marshalNTypedObjectReference2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReference(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_dataset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "VersionedDataset", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { + case "apiGroup": + return ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) + return ec.fieldContext_TypedObjectReference_kind(ctx, field) + case "Name": + return ec.fieldContext_TypedObjectReference_Name(ctx, field) + case "Namespace": + return ec.fieldContext_TypedObjectReference_Namespace(ctx, field) } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, fmt.Errorf("no field named %q was found under type TypedObjectReference", field.Name) }, } return fc, nil } -func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) +func (ec *executionContext) _VersionedDataset_updateTimestamp(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_updateTimestamp(ctx, field) if err != nil { return graphql.Null } @@ -8039,7 +9083,7 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.PossibleTypes(), nil + return obj.UpdateTimestamp, nil }) if err != nil { ec.Error(ctx, err) @@ -8048,48 +9092,26 @@ func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field gra if resTmp == nil { return graphql.Null } - res := resTmp.([]introspection.Type) + res := resTmp.(*time.Time) fc.Result = res - return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) + return ec.marshalOTime2ᚖtimeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_updateTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "VersionedDataset", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_enumValues(ctx, field) +func (ec *executionContext) _VersionedDataset_creationTimestamp(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_creationTimestamp(ctx, field) if err != nil { return graphql.Null } @@ -8102,56 +9124,38 @@ func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphq }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil + return obj.CreationTimestamp, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]introspection.EnumValue) + res := resTmp.(time.Time) fc.Result = res - return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) + return ec.marshalNTime2timeᚐTime(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_creationTimestamp(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "VersionedDataset", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "name": - return ec.fieldContext___EnumValue_name(ctx, field) - case "description": - return ec.fieldContext___EnumValue_description(ctx, field) - case "isDeprecated": - return ec.fieldContext___EnumValue_isDeprecated(ctx, field) - case "deprecationReason": - return ec.fieldContext___EnumValue_deprecationReason(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) + return nil, errors.New("field of type Time does not have child fields") }, } - defer func() { - if r := recover(); r != nil { - err = ec.Recover(ctx, r) - ec.Error(ctx, err) - } - }() - ctx = graphql.WithFieldContext(ctx, fc) - if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { - ec.Error(ctx, err) - return fc, err - } return fc, nil } -func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_inputFields(ctx, field) +func (ec *executionContext) _VersionedDataset_files(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_files(ctx, field) if err != nil { return graphql.Null } @@ -8164,45 +9168,61 @@ func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graph }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.InputFields(), nil + return ec.resolvers.VersionedDataset().Files(rctx, obj, fc.Args["input"].(*FileFilter)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]introspection.InputValue) + res := resTmp.(*PaginatedResult) fc.Result = res - return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) + return ec.marshalNPaginatedResult2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPaginatedResult(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_files(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "VersionedDataset", Field: field, IsMethod: true, - IsResolver: false, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { switch field.Name { - case "name": - return ec.fieldContext___InputValue_name(ctx, field) - case "description": - return ec.fieldContext___InputValue_description(ctx, field) - case "type": - return ec.fieldContext___InputValue_type(ctx, field) - case "defaultValue": - return ec.fieldContext___InputValue_defaultValue(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) - }, - } - return fc, nil + case "hasNextPage": + return ec.fieldContext_PaginatedResult_hasNextPage(ctx, field) + case "nodes": + return ec.fieldContext_PaginatedResult_nodes(ctx, field) + case "page": + return ec.fieldContext_PaginatedResult_page(ctx, field) + case "pageSize": + return ec.fieldContext_PaginatedResult_pageSize(ctx, field) + case "totalCount": + return ec.fieldContext_PaginatedResult_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PaginatedResult", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_VersionedDataset_files_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil } -func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_ofType(ctx, field) +func (ec *executionContext) _VersionedDataset_version(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_version(ctx, field) if err != nil { return graphql.Null } @@ -8215,57 +9235,38 @@ func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.Co }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.OfType(), nil + return obj.Version, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*introspection.Type) + res := resTmp.(string) fc.Result = res - return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) + return ec.marshalNString2string(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_version(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "VersionedDataset", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "kind": - return ec.fieldContext___Type_kind(ctx, field) - case "name": - return ec.fieldContext___Type_name(ctx, field) - case "description": - return ec.fieldContext___Type_description(ctx, field) - case "fields": - return ec.fieldContext___Type_fields(ctx, field) - case "interfaces": - return ec.fieldContext___Type_interfaces(ctx, field) - case "possibleTypes": - return ec.fieldContext___Type_possibleTypes(ctx, field) - case "enumValues": - return ec.fieldContext___Type_enumValues(ctx, field) - case "inputFields": - return ec.fieldContext___Type_inputFields(ctx, field) - case "ofType": - return ec.fieldContext___Type_ofType(ctx, field) - case "specifiedByURL": - return ec.fieldContext___Type_specifiedByURL(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + return nil, errors.New("field of type String does not have child fields") }, } return fc, nil } -func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { - fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) +func (ec *executionContext) _VersionedDataset_fileCount(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_fileCount(ctx, field) if err != nil { return graphql.Null } @@ -8278,35 +9279,38 @@ func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field gr }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.SpecifiedByURL(), nil + return obj.FileCount, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*string) + res := resTmp.(int) fc.Result = res - return ec.marshalOString2ᚖstring(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_fileCount(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "__Type", + Object: "VersionedDataset", Field: field, - IsMethod: true, + IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _filegroup_source(ctx context.Context, field graphql.CollectedField, obj *Filegroup) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_filegroup_source(ctx, field) +func (ec *executionContext) _VersionedDataset_released(ctx context.Context, field graphql.CollectedField, obj *VersionedDataset) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDataset_released(ctx, field) if err != nil { return graphql.Null } @@ -8319,45 +9323,38 @@ func (ec *executionContext) _filegroup_source(ctx context.Context, field graphql }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Source, nil + return obj.Released, nil }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.(*TypedObjectReference) + res := resTmp.(int) fc.Result = res - return ec.marshalOTypedObjectReference2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReference(ctx, field.Selections, res) + return ec.marshalNInt2int(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_filegroup_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDataset_released(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "filegroup", + Object: "VersionedDataset", Field: field, IsMethod: false, IsResolver: false, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - switch field.Name { - case "apiGroup": - return ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) - case "kind": - return ec.fieldContext_TypedObjectReference_kind(ctx, field) - case "Name": - return ec.fieldContext_TypedObjectReference_Name(ctx, field) - case "Namespace": - return ec.fieldContext_TypedObjectReference_Namespace(ctx, field) - } - return nil, fmt.Errorf("no field named %q was found under type TypedObjectReference", field.Name) + return nil, errors.New("field of type Int does not have child fields") }, } return fc, nil } -func (ec *executionContext) _filegroup_path(ctx context.Context, field graphql.CollectedField, obj *Filegroup) (ret graphql.Marshaler) { - fc, err := ec.fieldContext_filegroup_path(ctx, field) +func (ec *executionContext) _VersionedDatasetMutation_createVersionedDataset(ctx context.Context, field graphql.CollectedField, obj *VersionedDatasetMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDatasetMutation_createVersionedDataset(ctx, field) if err != nil { return graphql.Null } @@ -8370,136 +9367,2416 @@ func (ec *executionContext) _filegroup_path(ctx context.Context, field graphql.C }() resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { ctx = rctx // use context from middleware stack in children - return obj.Path, nil + return ec.resolvers.VersionedDatasetMutation().CreateVersionedDataset(rctx, obj, fc.Args["input"].(CreateVersionedDatasetInput)) }) if err != nil { ec.Error(ctx, err) return graphql.Null } if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } return graphql.Null } - res := resTmp.([]string) + res := resTmp.(*VersionedDataset) fc.Result = res - return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) + return ec.marshalNVersionedDataset2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐVersionedDataset(ctx, field.Selections, res) } -func (ec *executionContext) fieldContext_filegroup_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { +func (ec *executionContext) fieldContext_VersionedDatasetMutation_createVersionedDataset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { fc = &graphql.FieldContext{ - Object: "filegroup", + Object: "VersionedDatasetMutation", Field: field, - IsMethod: false, - IsResolver: false, + IsMethod: true, + IsResolver: true, Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { - return nil, errors.New("field of type String does not have child fields") + switch field.Name { + case "name": + return ec.fieldContext_VersionedDataset_name(ctx, field) + case "namespace": + return ec.fieldContext_VersionedDataset_namespace(ctx, field) + case "labels": + return ec.fieldContext_VersionedDataset_labels(ctx, field) + case "annotations": + return ec.fieldContext_VersionedDataset_annotations(ctx, field) + case "creator": + return ec.fieldContext_VersionedDataset_creator(ctx, field) + case "displayName": + return ec.fieldContext_VersionedDataset_displayName(ctx, field) + case "dataset": + return ec.fieldContext_VersionedDataset_dataset(ctx, field) + case "updateTimestamp": + return ec.fieldContext_VersionedDataset_updateTimestamp(ctx, field) + case "creationTimestamp": + return ec.fieldContext_VersionedDataset_creationTimestamp(ctx, field) + case "files": + return ec.fieldContext_VersionedDataset_files(ctx, field) + case "version": + return ec.fieldContext_VersionedDataset_version(ctx, field) + case "fileCount": + return ec.fieldContext_VersionedDataset_fileCount(ctx, field) + case "released": + return ec.fieldContext_VersionedDataset_released(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type VersionedDataset", field.Name) }, } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_VersionedDatasetMutation_createVersionedDataset_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } return fc, nil } -// endregion **************************** field.gotpl ***************************** - -// region **************************** input.gotpl ***************************** - -func (ec *executionContext) unmarshalInputCreateDatasourceInput(ctx context.Context, obj interface{}) (CreateDatasourceInput, error) { - var it CreateDatasourceInput - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v +func (ec *executionContext) _VersionedDatasetMutation_updateVersionedDataset(ctx context.Context, field graphql.CollectedField, obj *VersionedDatasetMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDatasetMutation_updateVersionedDataset(ctx, field) + if err != nil { + return graphql.Null } - - fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description", "endpointinput", "ossinput"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null } - switch k { - case "name": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Name = data - case "namespace": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Namespace = data - case "labels": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.Labels = data - case "annotations": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.Annotations = data - case "displayName": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.DisplayName = data - case "description": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.Description = data - case "endpointinput": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("endpointinput")) - data, err := ec.unmarshalOEndpointInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEndpointInput(ctx, v) - if err != nil { - return it, err - } - it.Endpointinput = data - case "ossinput": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ossinput")) - data, err := ec.unmarshalOOssInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐOssInput(ctx, v) - if err != nil { - return it, err - } - it.Ossinput = data + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.VersionedDatasetMutation().UpdateVersionedDataset(rctx, obj, fc.Args["input"].(UpdateVersionedDatasetInput)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") } + return graphql.Null } - - return it, nil + res := resTmp.(*VersionedDataset) + fc.Result = res + return ec.marshalNVersionedDataset2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐVersionedDataset(ctx, field.Selections, res) } -func (ec *executionContext) unmarshalInputCreateEmbedderInput(ctx context.Context, obj interface{}) (CreateEmbedderInput, error) { - var it CreateEmbedderInput - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - +func (ec *executionContext) fieldContext_VersionedDatasetMutation_updateVersionedDataset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "VersionedDatasetMutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext_VersionedDataset_name(ctx, field) + case "namespace": + return ec.fieldContext_VersionedDataset_namespace(ctx, field) + case "labels": + return ec.fieldContext_VersionedDataset_labels(ctx, field) + case "annotations": + return ec.fieldContext_VersionedDataset_annotations(ctx, field) + case "creator": + return ec.fieldContext_VersionedDataset_creator(ctx, field) + case "displayName": + return ec.fieldContext_VersionedDataset_displayName(ctx, field) + case "dataset": + return ec.fieldContext_VersionedDataset_dataset(ctx, field) + case "updateTimestamp": + return ec.fieldContext_VersionedDataset_updateTimestamp(ctx, field) + case "creationTimestamp": + return ec.fieldContext_VersionedDataset_creationTimestamp(ctx, field) + case "files": + return ec.fieldContext_VersionedDataset_files(ctx, field) + case "version": + return ec.fieldContext_VersionedDataset_version(ctx, field) + case "fileCount": + return ec.fieldContext_VersionedDataset_fileCount(ctx, field) + case "released": + return ec.fieldContext_VersionedDataset_released(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type VersionedDataset", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_VersionedDatasetMutation_updateVersionedDataset_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _VersionedDatasetMutation_deleteVersionedDatasets(ctx context.Context, field graphql.CollectedField, obj *VersionedDatasetMutation) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDatasetMutation_deleteVersionedDatasets(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.VersionedDatasetMutation().DeleteVersionedDatasets(rctx, obj, fc.Args["input"].(DeleteVersionedDatasetInput)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOVoid2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_VersionedDatasetMutation_deleteVersionedDatasets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "VersionedDatasetMutation", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Void does not have child fields") + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_VersionedDatasetMutation_deleteVersionedDatasets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _VersionedDatasetQuery_getVersionedDataset(ctx context.Context, field graphql.CollectedField, obj *VersionedDatasetQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDatasetQuery_getVersionedDataset(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.VersionedDatasetQuery().GetVersionedDataset(rctx, obj, fc.Args["name"].(string), fc.Args["namespace"].(string)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*VersionedDataset) + fc.Result = res + return ec.marshalNVersionedDataset2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐVersionedDataset(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_VersionedDatasetQuery_getVersionedDataset(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "VersionedDatasetQuery", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext_VersionedDataset_name(ctx, field) + case "namespace": + return ec.fieldContext_VersionedDataset_namespace(ctx, field) + case "labels": + return ec.fieldContext_VersionedDataset_labels(ctx, field) + case "annotations": + return ec.fieldContext_VersionedDataset_annotations(ctx, field) + case "creator": + return ec.fieldContext_VersionedDataset_creator(ctx, field) + case "displayName": + return ec.fieldContext_VersionedDataset_displayName(ctx, field) + case "dataset": + return ec.fieldContext_VersionedDataset_dataset(ctx, field) + case "updateTimestamp": + return ec.fieldContext_VersionedDataset_updateTimestamp(ctx, field) + case "creationTimestamp": + return ec.fieldContext_VersionedDataset_creationTimestamp(ctx, field) + case "files": + return ec.fieldContext_VersionedDataset_files(ctx, field) + case "version": + return ec.fieldContext_VersionedDataset_version(ctx, field) + case "fileCount": + return ec.fieldContext_VersionedDataset_fileCount(ctx, field) + case "released": + return ec.fieldContext_VersionedDataset_released(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type VersionedDataset", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_VersionedDatasetQuery_getVersionedDataset_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) _VersionedDatasetQuery_listVersionedDatasets(ctx context.Context, field graphql.CollectedField, obj *VersionedDatasetQuery) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_VersionedDatasetQuery_listVersionedDatasets(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return ec.resolvers.VersionedDatasetQuery().ListVersionedDatasets(rctx, obj, fc.Args["input"].(ListVersionedDatasetInput)) + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*PaginatedResult) + fc.Result = res + return ec.marshalNPaginatedResult2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐPaginatedResult(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_VersionedDatasetQuery_listVersionedDatasets(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "VersionedDatasetQuery", + Field: field, + IsMethod: true, + IsResolver: true, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "hasNextPage": + return ec.fieldContext_PaginatedResult_hasNextPage(ctx, field) + case "nodes": + return ec.fieldContext_PaginatedResult_nodes(ctx, field) + case "page": + return ec.fieldContext_PaginatedResult_page(ctx, field) + case "pageSize": + return ec.fieldContext_PaginatedResult_pageSize(ctx, field) + case "totalCount": + return ec.fieldContext_PaginatedResult_totalCount(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type PaginatedResult", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field_VersionedDatasetQuery_listVersionedDatasets_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) ___Directive_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_locations(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_locations(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Locations, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalN__DirectiveLocation2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_locations(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __DirectiveLocation does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_args(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField, obj *introspection.Directive) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Directive_isRepeatable(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsRepeatable, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Directive_isRepeatable(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Directive", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.EnumValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___EnumValue_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___EnumValue_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__EnumValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_args(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_args(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Args, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalN__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_args(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_type(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_isDeprecated(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_isDeprecated(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.IsDeprecated(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(bool) + fc.Result = res + return ec.marshalNBoolean2bool(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_isDeprecated(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type Boolean does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Field_deprecationReason(ctx context.Context, field graphql.CollectedField, obj *introspection.Field) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Field_deprecationReason(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DeprecationReason(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Field_deprecationReason(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Field", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_name(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalNString2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_description(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_type(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_type(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Type, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_type(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField, obj *introspection.InputValue) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___InputValue_defaultValue(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.DefaultValue, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___InputValue_defaultValue(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__InputValue", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_types(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_types(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Types(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_types(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_queryType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_queryType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.QueryType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalN__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_queryType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_mutationType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_mutationType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.MutationType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_mutationType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_subscriptionType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SubscriptionType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_subscriptionType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Schema_directives(ctx context.Context, field graphql.CollectedField, obj *introspection.Schema) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Schema_directives(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Directives(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.([]introspection.Directive) + fc.Result = res + return ec.marshalN__Directive2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirectiveᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Schema_directives(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Schema", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Directive_name(ctx, field) + case "description": + return ec.fieldContext___Directive_description(ctx, field) + case "locations": + return ec.fieldContext___Directive_locations(ctx, field) + case "args": + return ec.fieldContext___Directive_args(ctx, field) + case "isRepeatable": + return ec.fieldContext___Directive_isRepeatable(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Directive", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_kind(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_kind(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Kind(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + if !graphql.HasFieldError(ctx, fc) { + ec.Errorf(ctx, "must not be null") + } + return graphql.Null + } + res := resTmp.(string) + fc.Result = res + return ec.marshalN__TypeKind2string(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_kind(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type __TypeKind does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_name(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_name(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Name(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_description(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_description(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Description(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_description(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_fields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_fields(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Fields(fc.Args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Field) + fc.Result = res + return ec.marshalO__Field2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐFieldᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_fields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___Field_name(ctx, field) + case "description": + return ec.fieldContext___Field_description(ctx, field) + case "args": + return ec.fieldContext___Field_args(ctx, field) + case "type": + return ec.fieldContext___Field_type(ctx, field) + case "isDeprecated": + return ec.fieldContext___Field_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___Field_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Field", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_fields_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) ___Type_interfaces(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_interfaces(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Interfaces(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_interfaces(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_possibleTypes(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_possibleTypes(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.PossibleTypes(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐTypeᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_possibleTypes(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_enumValues(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_enumValues(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.EnumValues(fc.Args["includeDeprecated"].(bool)), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.EnumValue) + fc.Result = res + return ec.marshalO__EnumValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐEnumValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_enumValues(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___EnumValue_name(ctx, field) + case "description": + return ec.fieldContext___EnumValue_description(ctx, field) + case "isDeprecated": + return ec.fieldContext___EnumValue_isDeprecated(ctx, field) + case "deprecationReason": + return ec.fieldContext___EnumValue_deprecationReason(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __EnumValue", field.Name) + }, + } + defer func() { + if r := recover(); r != nil { + err = ec.Recover(ctx, r) + ec.Error(ctx, err) + } + }() + ctx = graphql.WithFieldContext(ctx, fc) + if fc.Args, err = ec.field___Type_enumValues_args(ctx, field.ArgumentMap(ec.Variables)); err != nil { + ec.Error(ctx, err) + return fc, err + } + return fc, nil +} + +func (ec *executionContext) ___Type_inputFields(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_inputFields(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.InputFields(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]introspection.InputValue) + fc.Result = res + return ec.marshalO__InputValue2ᚕgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐInputValueᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_inputFields(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "name": + return ec.fieldContext___InputValue_name(ctx, field) + case "description": + return ec.fieldContext___InputValue_description(ctx, field) + case "type": + return ec.fieldContext___InputValue_type(ctx, field) + case "defaultValue": + return ec.fieldContext___InputValue_defaultValue(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __InputValue", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_ofType(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_ofType(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.OfType(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*introspection.Type) + fc.Result = res + return ec.marshalO__Type2ᚖgithubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐType(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_ofType(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "kind": + return ec.fieldContext___Type_kind(ctx, field) + case "name": + return ec.fieldContext___Type_name(ctx, field) + case "description": + return ec.fieldContext___Type_description(ctx, field) + case "fields": + return ec.fieldContext___Type_fields(ctx, field) + case "interfaces": + return ec.fieldContext___Type_interfaces(ctx, field) + case "possibleTypes": + return ec.fieldContext___Type_possibleTypes(ctx, field) + case "enumValues": + return ec.fieldContext___Type_enumValues(ctx, field) + case "inputFields": + return ec.fieldContext___Type_inputFields(ctx, field) + case "ofType": + return ec.fieldContext___Type_ofType(ctx, field) + case "specifiedByURL": + return ec.fieldContext___Type_specifiedByURL(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type __Type", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) ___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField, obj *introspection.Type) (ret graphql.Marshaler) { + fc, err := ec.fieldContext___Type_specifiedByURL(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.SpecifiedByURL(), nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*string) + fc.Result = res + return ec.marshalOString2ᚖstring(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext___Type_specifiedByURL(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "__Type", + Field: field, + IsMethod: true, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +func (ec *executionContext) _filegroup_source(ctx context.Context, field graphql.CollectedField, obj *Filegroup) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_filegroup_source(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Source, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.(*TypedObjectReference) + fc.Result = res + return ec.marshalOTypedObjectReference2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReference(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_filegroup_source(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "filegroup", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + switch field.Name { + case "apiGroup": + return ec.fieldContext_TypedObjectReference_apiGroup(ctx, field) + case "kind": + return ec.fieldContext_TypedObjectReference_kind(ctx, field) + case "Name": + return ec.fieldContext_TypedObjectReference_Name(ctx, field) + case "Namespace": + return ec.fieldContext_TypedObjectReference_Namespace(ctx, field) + } + return nil, fmt.Errorf("no field named %q was found under type TypedObjectReference", field.Name) + }, + } + return fc, nil +} + +func (ec *executionContext) _filegroup_path(ctx context.Context, field graphql.CollectedField, obj *Filegroup) (ret graphql.Marshaler) { + fc, err := ec.fieldContext_filegroup_path(ctx, field) + if err != nil { + return graphql.Null + } + ctx = graphql.WithFieldContext(ctx, fc) + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + ret = graphql.Null + } + }() + resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) { + ctx = rctx // use context from middleware stack in children + return obj.Path, nil + }) + if err != nil { + ec.Error(ctx, err) + return graphql.Null + } + if resTmp == nil { + return graphql.Null + } + res := resTmp.([]string) + fc.Result = res + return ec.marshalOString2ᚕstringᚄ(ctx, field.Selections, res) +} + +func (ec *executionContext) fieldContext_filegroup_path(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) { + fc = &graphql.FieldContext{ + Object: "filegroup", + Field: field, + IsMethod: false, + IsResolver: false, + Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) { + return nil, errors.New("field of type String does not have child fields") + }, + } + return fc, nil +} + +// endregion **************************** field.gotpl ***************************** + +// region **************************** input.gotpl ***************************** + +func (ec *executionContext) unmarshalInputCreateDatasetInput(ctx context.Context, obj interface{}) (CreateDatasetInput, error) { + var it CreateDatasetInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description", "contentType", "filed"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "labels": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Labels = data + case "annotations": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Annotations = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "description": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Description = data + case "contentType": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("contentType")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.ContentType = data + case "filed": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("filed")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Filed = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputCreateDatasourceInput(ctx context.Context, obj interface{}) (CreateDatasourceInput, error) { + var it CreateDatasourceInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description", "endpointinput", "ossinput"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "labels": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Labels = data + case "annotations": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Annotations = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "description": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Description = data + case "endpointinput": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("endpointinput")) + data, err := ec.unmarshalOEndpointInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEndpointInput(ctx, v) + if err != nil { + return it, err + } + it.Endpointinput = data + case "ossinput": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("ossinput")) + data, err := ec.unmarshalOOssInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐOssInput(ctx, v) + if err != nil { + return it, err + } + it.Ossinput = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputCreateEmbedderInput(ctx context.Context, obj interface{}) (CreateEmbedderInput, error) { + var it CreateEmbedderInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description", "endpointinput", "serviceType"} for _, k := range fieldsInOrder { v, ok := asMap[k] @@ -8511,7 +11788,1137 @@ func (ec *executionContext) unmarshalInputCreateEmbedderInput(ctx context.Contex var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "labels": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Labels = data + case "annotations": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Annotations = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "description": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Description = data + case "endpointinput": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("endpointinput")) + data, err := ec.unmarshalOEndpointInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEndpointInput(ctx, v) + if err != nil { + return it, err + } + it.Endpointinput = data + case "serviceType": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceType")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.ServiceType = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputCreateKnowledgeBaseInput(ctx context.Context, obj interface{}) (CreateKnowledgeBaseInput, error) { + var it CreateKnowledgeBaseInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description", "embedder", "vectorStore", "fileGroups"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "labels": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Labels = data + case "annotations": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Annotations = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "description": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Description = data + case "embedder": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("embedder")) + data, err := ec.unmarshalOTypedObjectReferenceInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReferenceInput(ctx, v) + if err != nil { + return it, err + } + it.Embedder = data + case "vectorStore": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("vectorStore")) + data, err := ec.unmarshalOTypedObjectReferenceInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReferenceInput(ctx, v) + if err != nil { + return it, err + } + it.VectorStore = data + case "fileGroups": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileGroups")) + data, err := ec.unmarshalOfilegroupinput2ᚕᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFilegroupinputᚄ(ctx, v) + if err != nil { + return it, err + } + it.FileGroups = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputCreateModelInput(ctx context.Context, obj interface{}) (CreateModelInput, error) { + var it CreateModelInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "displayName", "field", "description", "modeltype"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "field": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Field = data + case "description": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Description = data + case "modeltype": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("modeltype")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Modeltype = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputCreateVersionedDatasetInput(ctx context.Context, obj interface{}) (CreateVersionedDatasetInput, error) { + var it CreateVersionedDatasetInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "datasetName", "labels", "annotations", "displayName", "description", "version", "release", "fileGrups"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "datasetName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("datasetName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DatasetName = data + case "labels": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Labels = data + case "annotations": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Annotations = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "description": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Description = data + case "version": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("version")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Version = data + case "release": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("release")) + data, err := ec.unmarshalNInt2int(ctx, v) + if err != nil { + return it, err + } + it.Release = data + case "fileGrups": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileGrups")) + data, err := ec.unmarshalOFileGroup2ᚕᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFileGroup(ctx, v) + if err != nil { + return it, err + } + it.FileGrups = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputDeleteDatasetInput(ctx context.Context, obj interface{}) (DeleteDatasetInput, error) { + var it DeleteDatasetInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "labelSelector", "fieldSelector"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "labelSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LabelSelector = data + case "fieldSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.FieldSelector = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputDeleteDatasourceInput(ctx context.Context, obj interface{}) (DeleteDatasourceInput, error) { + var it DeleteDatasourceInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "labelSelector", "fieldSelector"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "labelSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LabelSelector = data + case "fieldSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.FieldSelector = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputDeleteEmbedderInput(ctx context.Context, obj interface{}) (DeleteEmbedderInput, error) { + var it DeleteEmbedderInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "labelSelector", "fieldSelector"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "labelSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LabelSelector = data + case "fieldSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.FieldSelector = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputDeleteKnowledgeBaseInput(ctx context.Context, obj interface{}) (DeleteKnowledgeBaseInput, error) { + var it DeleteKnowledgeBaseInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "labelSelector", "fieldSelector"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "labelSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LabelSelector = data + case "fieldSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.FieldSelector = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputDeleteModelInput(ctx context.Context, obj interface{}) (DeleteModelInput, error) { + var it DeleteModelInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "labelSelector", "fieldSelector"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "labelSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LabelSelector = data + case "fieldSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.FieldSelector = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputDeleteVersionedDatasetInput(ctx context.Context, obj interface{}) (DeleteVersionedDatasetInput, error) { + var it DeleteVersionedDatasetInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "labelSelector", "fieldSelector"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "labelSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LabelSelector = data + case "fieldSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.FieldSelector = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputEndpointInput(ctx context.Context, obj interface{}) (EndpointInput, error) { + var it EndpointInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"url", "authSecret", "insecure"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "url": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("url")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.URL = data + case "authSecret": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("authSecret")) + data, err := ec.unmarshalOTypedObjectReferenceInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReferenceInput(ctx, v) + if err != nil { + return it, err + } + it.AuthSecret = data + case "insecure": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("insecure")) + data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + if err != nil { + return it, err + } + it.Insecure = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputFileFilter(ctx context.Context, obj interface{}) (FileFilter, error) { + var it FileFilter + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"keyword", "page", "pageSize", "sortBy"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "keyword": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyword")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Keyword = data + case "page": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) + data, err := ec.unmarshalNInt2int(ctx, v) + if err != nil { + return it, err + } + it.Page = data + case "pageSize": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) + data, err := ec.unmarshalNInt2int(ctx, v) + if err != nil { + return it, err + } + it.PageSize = data + case "sortBy": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("sortBy")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.SortBy = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputFileGroup(ctx context.Context, obj interface{}) (FileGroup, error) { + var it FileGroup + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"datasource", "paths"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "datasource": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("datasource")) + data, err := ec.unmarshalNTypedObjectReferenceInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReferenceInput(ctx, v) + if err != nil { + return it, err + } + it.Datasource = data + case "paths": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("paths")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) + if err != nil { + return it, err + } + it.Paths = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputListDatasetInput(ctx context.Context, obj interface{}) (ListDatasetInput, error) { + var it ListDatasetInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "displayName", "labelSelector", "fieldSelector", "page", "pageSize", "keyword"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "labelSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LabelSelector = data + case "fieldSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.FieldSelector = data + case "page": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.Page = data + case "pageSize": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.PageSize = data + case "keyword": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyword")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Keyword = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputListDatasourceInput(ctx context.Context, obj interface{}) (ListDatasourceInput, error) { + var it ListDatasourceInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "displayName", "labelSelector", "fieldSelector", "page", "pageSize", "keyword"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "labelSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LabelSelector = data + case "fieldSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.FieldSelector = data + case "page": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.Page = data + case "pageSize": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.PageSize = data + case "keyword": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyword")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Keyword = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputListEmbedderInput(ctx context.Context, obj interface{}) (ListEmbedderInput, error) { + var it ListEmbedderInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "displayName", "labelSelector", "fieldSelector", "page", "pageSize", "keyword"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "labelSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.LabelSelector = data + case "fieldSelector": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.FieldSelector = data + case "page": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.Page = data + case "pageSize": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.PageSize = data + case "keyword": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyword")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Keyword = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputListKnowledgeBaseInput(ctx context.Context, obj interface{}) (ListKnowledgeBaseInput, error) { + var it ListKnowledgeBaseInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"name", "namespace", "displayName", "labelSelector", "fieldSelector", "page", "pageSize", "keyword"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } @@ -8525,74 +12932,74 @@ func (ec *executionContext) unmarshalInputCreateEmbedderInput(ctx context.Contex return it, err } it.Namespace = data - case "labels": + case "displayName": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) - data, err := ec.unmarshalOMap2map(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Labels = data - case "annotations": + it.DisplayName = data + case "labelSelector": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) - data, err := ec.unmarshalOMap2map(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Annotations = data - case "displayName": + it.LabelSelector = data + case "fieldSelector": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalNString2string(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.DisplayName = data - case "description": + it.FieldSelector = data + case "page": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.Description = data - case "endpointinput": + it.Page = data + case "pageSize": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("endpointinput")) - data, err := ec.unmarshalOEndpointInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEndpointInput(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.Endpointinput = data - case "serviceType": + it.PageSize = data + case "keyword": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("serviceType")) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyword")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.ServiceType = data + it.Keyword = data } } return it, nil } -func (ec *executionContext) unmarshalInputCreateKnowledgeBaseInput(ctx context.Context, obj interface{}) (CreateKnowledgeBaseInput, error) { - var it CreateKnowledgeBaseInput +func (ec *executionContext) unmarshalInputListModelInput(ctx context.Context, obj interface{}) (ListModelInput, error) { + var it ListModelInput asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description", "embedder", "vectorStore", "fileGroups"} + fieldsInOrder := [...]string{"name", "namespace", "displayName", "labelSelector", "fieldSelector", "page", "pageSize", "keyword"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -8603,7 +13010,7 @@ func (ec *executionContext) unmarshalInputCreateKnowledgeBaseInput(ctx context.C var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } @@ -8617,83 +13024,74 @@ func (ec *executionContext) unmarshalInputCreateKnowledgeBaseInput(ctx context.C return it, err } it.Namespace = data - case "labels": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.Labels = data - case "annotations": + case "displayName": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) - data, err := ec.unmarshalOMap2map(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Annotations = data - case "displayName": + it.DisplayName = data + case "labelSelector": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalNString2string(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.DisplayName = data - case "description": + it.LabelSelector = data + case "fieldSelector": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Description = data - case "embedder": + it.FieldSelector = data + case "page": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("embedder")) - data, err := ec.unmarshalOTypedObjectReferenceInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReferenceInput(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.Embedder = data - case "vectorStore": + it.Page = data + case "pageSize": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("vectorStore")) - data, err := ec.unmarshalOTypedObjectReferenceInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReferenceInput(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.VectorStore = data - case "fileGroups": + it.PageSize = data + case "keyword": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileGroups")) - data, err := ec.unmarshalOfilegroupinput2ᚕᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFilegroupinputᚄ(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyword")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.FileGroups = data + it.Keyword = data } } return it, nil } -func (ec *executionContext) unmarshalInputCreateModelInput(ctx context.Context, obj interface{}) (CreateModelInput, error) { - var it CreateModelInput +func (ec *executionContext) unmarshalInputListVersionedDatasetInput(ctx context.Context, obj interface{}) (ListVersionedDatasetInput, error) { + var it ListVersionedDatasetInput asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"name", "namespace", "displayName", "field", "description", "modeltype"} + fieldsInOrder := [...]string{"name", "namespace", "displayName", "labelSelector", "fieldSelector", "page", "pageSize", "keyword"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -8704,7 +13102,7 @@ func (ec *executionContext) unmarshalInputCreateModelInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } @@ -8722,108 +13120,164 @@ func (ec *executionContext) unmarshalInputCreateModelInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalNString2string(ctx, v) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } it.DisplayName = data - case "field": + case "labelSelector": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("field")) - data, err := ec.unmarshalNString2string(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Field = data - case "description": + it.LabelSelector = data + case "fieldSelector": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Description = data - case "modeltype": + it.FieldSelector = data + case "page": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("modeltype")) - data, err := ec.unmarshalNString2string(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) if err != nil { return it, err } - it.Modeltype = data + it.Page = data + case "pageSize": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) + data, err := ec.unmarshalOInt2ᚖint(ctx, v) + if err != nil { + return it, err + } + it.PageSize = data + case "keyword": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyword")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) + if err != nil { + return it, err + } + it.Keyword = data } } return it, nil } -func (ec *executionContext) unmarshalInputDeleteDatasourceInput(ctx context.Context, obj interface{}) (DeleteDatasourceInput, error) { - var it DeleteDatasourceInput +func (ec *executionContext) unmarshalInputOssInput(ctx context.Context, obj interface{}) (OssInput, error) { + var it OssInput asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"name", "namespace", "labelSelector", "fieldSelector"} + fieldsInOrder := [...]string{"bucket", "Object"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { continue } switch k { - case "name": + case "bucket": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bucket")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Name = data - case "namespace": + it.Bucket = data + case "Object": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - data, err := ec.unmarshalNString2string(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Object")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Namespace = data - case "labelSelector": + it.Object = data + } + } + + return it, nil +} + +func (ec *executionContext) unmarshalInputTypedObjectReferenceInput(ctx context.Context, obj interface{}) (TypedObjectReferenceInput, error) { + var it TypedObjectReferenceInput + asMap := map[string]interface{}{} + for k, v := range obj.(map[string]interface{}) { + asMap[k] = v + } + + fieldsInOrder := [...]string{"apiGroup", "kind", "Name", "Namespace"} + for _, k := range fieldsInOrder { + v, ok := asMap[k] + if !ok { + continue + } + switch k { + case "apiGroup": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiGroup")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LabelSelector = data - case "fieldSelector": + it.APIGroup = data + case "kind": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Kind = data + case "Name": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Name")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Name = data + case "Namespace": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Namespace")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.FieldSelector = data + it.Namespace = data } } return it, nil } -func (ec *executionContext) unmarshalInputDeleteEmbedderInput(ctx context.Context, obj interface{}) (DeleteEmbedderInput, error) { - var it DeleteEmbedderInput +func (ec *executionContext) unmarshalInputUpdateDatasetInput(ctx context.Context, obj interface{}) (UpdateDatasetInput, error) { + var it UpdateDatasetInput asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"name", "namespace", "labelSelector", "fieldSelector"} + fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -8834,7 +13288,7 @@ func (ec *executionContext) unmarshalInputDeleteEmbedderInput(ctx context.Contex var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } @@ -8842,44 +13296,62 @@ func (ec *executionContext) unmarshalInputDeleteEmbedderInput(ctx context.Contex case "namespace": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - data, err := ec.unmarshalNString2string(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.Namespace = data + case "labels": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Labels = data + case "annotations": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.Namespace = data - case "labelSelector": + it.Annotations = data + case "displayName": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.LabelSelector = data - case "fieldSelector": + it.DisplayName = data + case "description": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.FieldSelector = data + it.Description = data } } return it, nil } -func (ec *executionContext) unmarshalInputDeleteKnowledgeBaseInput(ctx context.Context, obj interface{}) (DeleteKnowledgeBaseInput, error) { - var it DeleteKnowledgeBaseInput +func (ec *executionContext) unmarshalInputUpdateDatasourceInput(ctx context.Context, obj interface{}) (UpdateDatasourceInput, error) { + var it UpdateDatasourceInput asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"name", "namespace", "labelSelector", "fieldSelector"} + fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -8890,7 +13362,7 @@ func (ec *executionContext) unmarshalInputDeleteKnowledgeBaseInput(ctx context.C var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } @@ -8904,38 +13376,56 @@ func (ec *executionContext) unmarshalInputDeleteKnowledgeBaseInput(ctx context.C return it, err } it.Namespace = data - case "labelSelector": + case "labels": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.LabelSelector = data - case "fieldSelector": + it.Labels = data + case "annotations": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) + if err != nil { + return it, err + } + it.Annotations = data + case "displayName": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) + if err != nil { + return it, err + } + it.DisplayName = data + case "description": + var err error + + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.FieldSelector = data + it.Description = data } } return it, nil } -func (ec *executionContext) unmarshalInputDeleteModelInput(ctx context.Context, obj interface{}) (DeleteModelInput, error) { - var it DeleteModelInput +func (ec *executionContext) unmarshalInputUpdateEmbedderInput(ctx context.Context, obj interface{}) (UpdateEmbedderInput, error) { + var it UpdateEmbedderInput asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"name", "namespace", "labelSelector", "fieldSelector"} + fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -8946,7 +13436,7 @@ func (ec *executionContext) unmarshalInputDeleteModelInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } @@ -8960,85 +13450,56 @@ func (ec *executionContext) unmarshalInputDeleteModelInput(ctx context.Context, return it, err } it.Namespace = data - case "labelSelector": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.LabelSelector = data - case "fieldSelector": + case "labels": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.FieldSelector = data - } - } - - return it, nil -} - -func (ec *executionContext) unmarshalInputEndpointInput(ctx context.Context, obj interface{}) (EndpointInput, error) { - var it EndpointInput - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - - fieldsInOrder := [...]string{"url", "authSecret", "insecure"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "url": + it.Labels = data + case "annotations": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("url")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.URL = data - case "authSecret": + it.Annotations = data + case "displayName": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("authSecret")) - data, err := ec.unmarshalOTypedObjectReferenceInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReferenceInput(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } - it.AuthSecret = data - case "insecure": + it.DisplayName = data + case "description": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("insecure")) - data, err := ec.unmarshalOBoolean2ᚖbool(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Insecure = data + it.Description = data } } return it, nil } -func (ec *executionContext) unmarshalInputListDatasourceInput(ctx context.Context, obj interface{}) (ListDatasourceInput, error) { - var it ListDatasourceInput +func (ec *executionContext) unmarshalInputUpdateKnowledgeBaseInput(ctx context.Context, obj interface{}) (UpdateKnowledgeBaseInput, error) { + var it UpdateKnowledgeBaseInput asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"name", "namespace", "displayName", "labelSelector", "fieldSelector", "page", "pageSize", "keyword"} + fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -9049,7 +13510,7 @@ func (ec *executionContext) unmarshalInputListDatasourceInput(ctx context.Contex var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } @@ -9063,74 +13524,56 @@ func (ec *executionContext) unmarshalInputListDatasourceInput(ctx context.Contex return it, err } it.Namespace = data - case "displayName": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.DisplayName = data - case "labelSelector": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.LabelSelector = data - case "fieldSelector": + case "labels": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.FieldSelector = data - case "page": + it.Labels = data + case "annotations": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) - data, err := ec.unmarshalOInt2ᚖint(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.Page = data - case "pageSize": + it.Annotations = data + case "displayName": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) - data, err := ec.unmarshalOInt2ᚖint(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } - it.PageSize = data - case "keyword": + it.DisplayName = data + case "description": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyword")) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Keyword = data + it.Description = data } } return it, nil } -func (ec *executionContext) unmarshalInputListEmbedderInput(ctx context.Context, obj interface{}) (ListEmbedderInput, error) { - var it ListEmbedderInput +func (ec *executionContext) unmarshalInputUpdateModelInput(ctx context.Context, obj interface{}) (UpdateModelInput, error) { + var it UpdateModelInput asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"name", "namespace", "displayName", "labelSelector", "fieldSelector", "page", "pageSize", "keyword"} + fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -9141,7 +13584,7 @@ func (ec *executionContext) unmarshalInputListEmbedderInput(ctx context.Context, var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } @@ -9155,74 +13598,56 @@ func (ec *executionContext) unmarshalInputListEmbedderInput(ctx context.Context, return it, err } it.Namespace = data - case "displayName": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.DisplayName = data - case "labelSelector": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.LabelSelector = data - case "fieldSelector": + case "labels": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.FieldSelector = data - case "page": + it.Labels = data + case "annotations": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) - data, err := ec.unmarshalOInt2ᚖint(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.Page = data - case "pageSize": + it.Annotations = data + case "displayName": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) - data, err := ec.unmarshalOInt2ᚖint(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } - it.PageSize = data - case "keyword": + it.DisplayName = data + case "description": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyword")) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.Keyword = data + it.Description = data } } return it, nil } -func (ec *executionContext) unmarshalInputListKnowledgeBaseInput(ctx context.Context, obj interface{}) (ListKnowledgeBaseInput, error) { - var it ListKnowledgeBaseInput +func (ec *executionContext) unmarshalInputUpdateVersionedDatasetInput(ctx context.Context, obj interface{}) (UpdateVersionedDatasetInput, error) { + var it UpdateVersionedDatasetInput asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"name", "namespace", "displayName", "labelSelector", "fieldSelector", "page", "pageSize", "keyword"} + fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description", "fileGroups"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { @@ -9233,7 +13658,7 @@ func (ec *executionContext) unmarshalInputListKnowledgeBaseInput(ctx context.Con var err error ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } @@ -9246,679 +13671,867 @@ func (ec *executionContext) unmarshalInputListKnowledgeBaseInput(ctx context.Con if err != nil { return it, err } - it.Namespace = data - case "displayName": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.DisplayName = data - case "labelSelector": + it.Namespace = data + case "labels": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.LabelSelector = data - case "fieldSelector": + it.Labels = data + case "annotations": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) + data, err := ec.unmarshalOMap2map(ctx, v) if err != nil { return it, err } - it.FieldSelector = data - case "page": + it.Annotations = data + case "displayName": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) - data, err := ec.unmarshalOInt2ᚖint(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) + data, err := ec.unmarshalNString2string(ctx, v) if err != nil { return it, err } - it.Page = data - case "pageSize": + it.DisplayName = data + case "description": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) - data, err := ec.unmarshalOInt2ᚖint(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) + data, err := ec.unmarshalOString2ᚖstring(ctx, v) if err != nil { return it, err } - it.PageSize = data - case "keyword": + it.Description = data + case "fileGroups": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyword")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fileGroups")) + data, err := ec.unmarshalOFileGroup2ᚕᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFileGroupᚄ(ctx, v) if err != nil { return it, err } - it.Keyword = data + it.FileGroups = data } } return it, nil } -func (ec *executionContext) unmarshalInputListModelInput(ctx context.Context, obj interface{}) (ListModelInput, error) { - var it ListModelInput +func (ec *executionContext) unmarshalInputfilegroupinput(ctx context.Context, obj interface{}) (Filegroupinput, error) { + var it Filegroupinput asMap := map[string]interface{}{} for k, v := range obj.(map[string]interface{}) { asMap[k] = v } - fieldsInOrder := [...]string{"name", "namespace", "displayName", "labelSelector", "fieldSelector", "page", "pageSize", "keyword"} + fieldsInOrder := [...]string{"source", "path"} for _, k := range fieldsInOrder { v, ok := asMap[k] if !ok { continue } switch k { - case "name": + case "source": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("source")) + data, err := ec.unmarshalNTypedObjectReferenceInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReferenceInput(ctx, v) if err != nil { return it, err } - it.Name = data - case "namespace": + it.Source = data + case "path": var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - data, err := ec.unmarshalNString2string(ctx, v) + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("path")) + data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) if err != nil { return it, err } - it.Namespace = data - case "displayName": - var err error + it.Path = data + } + } + + return it, nil +} + +// endregion **************************** input.gotpl ***************************** + +// region ************************** interface.gotpl *************************** + +func (ec *executionContext) _PageNode(ctx context.Context, sel ast.SelectionSet, obj PageNode) graphql.Marshaler { + switch obj := (obj).(type) { + case nil: + return graphql.Null + case Datasource: + return ec._Datasource(ctx, sel, &obj) + case *Datasource: + if obj == nil { + return graphql.Null + } + return ec._Datasource(ctx, sel, obj) + case Model: + return ec._Model(ctx, sel, &obj) + case *Model: + if obj == nil { + return graphql.Null + } + return ec._Model(ctx, sel, obj) + case Embedder: + return ec._Embedder(ctx, sel, &obj) + case *Embedder: + if obj == nil { + return graphql.Null + } + return ec._Embedder(ctx, sel, obj) + case KnowledgeBase: + return ec._KnowledgeBase(ctx, sel, &obj) + case *KnowledgeBase: + if obj == nil { + return graphql.Null + } + return ec._KnowledgeBase(ctx, sel, obj) + case Dataset: + return ec._Dataset(ctx, sel, &obj) + case *Dataset: + if obj == nil { + return graphql.Null + } + return ec._Dataset(ctx, sel, obj) + case VersionedDataset: + return ec._VersionedDataset(ctx, sel, &obj) + case *VersionedDataset: + if obj == nil { + return graphql.Null + } + return ec._VersionedDataset(ctx, sel, obj) + case F: + return ec._F(ctx, sel, &obj) + case *F: + if obj == nil { + return graphql.Null + } + return ec._F(ctx, sel, obj) + default: + panic(fmt.Errorf("unexpected type %T", obj)) + } +} + +// endregion ************************** interface.gotpl *************************** + +// region **************************** object.gotpl **************************** + +var datasetImplementors = []string{"Dataset", "PageNode"} + +func (ec *executionContext) _Dataset(ctx context.Context, sel ast.SelectionSet, obj *Dataset) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, datasetImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Dataset") + case "name": + out.Values[i] = ec._Dataset_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "namespace": + out.Values[i] = ec._Dataset_namespace(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "labels": + out.Values[i] = ec._Dataset_labels(ctx, field, obj) + case "annotations": + out.Values[i] = ec._Dataset_annotations(ctx, field, obj) + case "creator": + out.Values[i] = ec._Dataset_creator(ctx, field, obj) + case "displayName": + out.Values[i] = ec._Dataset_displayName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "updateTimestamp": + out.Values[i] = ec._Dataset_updateTimestamp(ctx, field, obj) + case "contentType": + out.Values[i] = ec._Dataset_contentType(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "field": + out.Values[i] = ec._Dataset_field(ctx, field, obj) + case "versions": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Dataset_versions(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "versionCount": + out.Values[i] = ec._Dataset_versionCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var datasetMutationImplementors = []string{"DatasetMutation"} + +func (ec *executionContext) _DatasetMutation(ctx context.Context, sel ast.SelectionSet, obj *DatasetMutation) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, datasetMutationImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("DatasetMutation") + case "createDataset": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._DatasetMutation_createDataset(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "updateDataset": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._DatasetMutation_updateDataset(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.DisplayName = data - case "labelSelector": - var err error + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labelSelector")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - it.LabelSelector = data - case "fieldSelector": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("fieldSelector")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.FieldSelector = data - case "page": - var err error + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "deleteDatasets": + field := field - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("page")) - data, err := ec.unmarshalOInt2ᚖint(ctx, v) - if err != nil { - return it, err + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._DatasetMutation_deleteDatasets(ctx, field, obj) + return res } - it.Page = data - case "pageSize": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("pageSize")) - data, err := ec.unmarshalOInt2ᚖint(ctx, v) - if err != nil { - return it, err - } - it.PageSize = data - case "keyword": - var err error + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("keyword")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - it.Keyword = data + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + default: + panic("unknown field " + strconv.Quote(field.Name)) } } - - return it, nil -} - -func (ec *executionContext) unmarshalInputOssInput(ctx context.Context, obj interface{}) (OssInput, error) { - var it OssInput - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null } - fieldsInOrder := [...]string{"bucket", "Object"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "bucket": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("bucket")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.Bucket = data - case "Object": - var err error + atomic.AddInt32(&ec.deferred, int32(len(deferred))) - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Object")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.Object = data - } + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) } - return it, nil + return out } -func (ec *executionContext) unmarshalInputTypedObjectReferenceInput(ctx context.Context, obj interface{}) (TypedObjectReferenceInput, error) { - var it TypedObjectReferenceInput - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } +var datasetQueryImplementors = []string{"DatasetQuery"} - fieldsInOrder := [...]string{"apiGroup", "kind", "Name", "Namespace"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "apiGroup": - var err error +func (ec *executionContext) _DatasetQuery(ctx context.Context, sel ast.SelectionSet, obj *DatasetQuery) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, datasetQueryImplementors) - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("apiGroup")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("DatasetQuery") + case "getDataset": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._DatasetQuery_getDataset(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res } - it.APIGroup = data - case "kind": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("kind")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - it.Kind = data - case "Name": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Name")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "listDatasets": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._DatasetQuery_listDatasets(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res } - it.Name = data - case "Namespace": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("Namespace")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - it.Namespace = data + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + default: + panic("unknown field " + strconv.Quote(field.Name)) } } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } - return it, nil + return out } -func (ec *executionContext) unmarshalInputUpdateDatasourceInput(ctx context.Context, obj interface{}) (UpdateDatasourceInput, error) { - var it UpdateDatasourceInput - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } +var datasourceImplementors = []string{"Datasource", "PageNode"} - fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "name": - var err error +func (ec *executionContext) _Datasource(ctx context.Context, sel ast.SelectionSet, obj *Datasource) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, datasourceImplementors) - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Datasource") + case "name": + out.Values[i] = ec._Datasource_name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } - it.Name = data case "namespace": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err + out.Values[i] = ec._Datasource_namespace(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } - it.Namespace = data case "labels": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.Labels = data + out.Values[i] = ec._Datasource_labels(ctx, field, obj) case "annotations": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.Annotations = data + out.Values[i] = ec._Datasource_annotations(ctx, field, obj) + case "creator": + out.Values[i] = ec._Datasource_creator(ctx, field, obj) case "displayName": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err + out.Values[i] = ec._Datasource_displayName(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } - it.DisplayName = data case "description": - var err error - - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err + out.Values[i] = ec._Datasource_description(ctx, field, obj) + case "endpoint": + out.Values[i] = ec._Datasource_endpoint(ctx, field, obj) + case "oss": + out.Values[i] = ec._Datasource_oss(ctx, field, obj) + case "status": + out.Values[i] = ec._Datasource_status(ctx, field, obj) + case "fileCount": + out.Values[i] = ec._Datasource_fileCount(ctx, field, obj) + case "updateTimestamp": + out.Values[i] = ec._Datasource_updateTimestamp(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ } - it.Description = data + default: + panic("unknown field " + strconv.Quote(field.Name)) } } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } - return it, nil -} + atomic.AddInt32(&ec.deferred, int32(len(deferred))) -func (ec *executionContext) unmarshalInputUpdateEmbedderInput(ctx context.Context, obj interface{}) (UpdateEmbedderInput, error) { - var it UpdateEmbedderInput - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) } - fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "name": - var err error + return out +} - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Name = data - case "namespace": - var err error +var datasourceMutationImplementors = []string{"DatasourceMutation"} - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Namespace = data - case "labels": - var err error +func (ec *executionContext) _DatasourceMutation(ctx context.Context, sel ast.SelectionSet, obj *DatasourceMutation) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, datasourceMutationImplementors) - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.Labels = data - case "annotations": - var err error + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("DatasourceMutation") + case "createDatasource": + field := field - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._DatasourceMutation_createDatasource(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res } - it.Annotations = data - case "displayName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.DisplayName = data - case "description": - var err error + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - it.Description = data - } - } - return it, nil -} + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "updateDatasource": + field := field -func (ec *executionContext) unmarshalInputUpdateKnowledgeBaseInput(ctx context.Context, obj interface{}) (UpdateKnowledgeBaseInput, error) { - var it UpdateKnowledgeBaseInput - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._DatasourceMutation_updateDatasource(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } - fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "name": - var err error + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - it.Name = data - case "namespace": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Namespace = data - case "labels": - var err error + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "deleteDatasource": + field := field - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._DatasourceMutation_deleteDatasource(ctx, field, obj) + return res } - it.Labels = data - case "annotations": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.Annotations = data - case "displayName": - var err error + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - it.DisplayName = data - case "description": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err - } - it.Description = data + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + default: + panic("unknown field " + strconv.Quote(field.Name)) } } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } - return it, nil -} + atomic.AddInt32(&ec.deferred, int32(len(deferred))) -func (ec *executionContext) unmarshalInputUpdateModelInput(ctx context.Context, obj interface{}) (UpdateModelInput, error) { - var it UpdateModelInput - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) } - fieldsInOrder := [...]string{"name", "namespace", "labels", "annotations", "displayName", "description"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "name": - var err error + return out +} - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("name")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Name = data - case "namespace": - var err error +var datasourceQueryImplementors = []string{"DatasourceQuery"} - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("namespace")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.Namespace = data - case "labels": - var err error +func (ec *executionContext) _DatasourceQuery(ctx context.Context, sel ast.SelectionSet, obj *DatasourceQuery) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, datasourceQueryImplementors) - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("labels")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err - } - it.Labels = data - case "annotations": - var err error + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("DatasourceQuery") + case "getDatasource": + field := field - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("annotations")) - data, err := ec.unmarshalOMap2map(ctx, v) - if err != nil { - return it, err + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._DatasourceQuery_getDatasource(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res } - it.Annotations = data - case "displayName": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("displayName")) - data, err := ec.unmarshalNString2string(ctx, v) - if err != nil { - return it, err - } - it.DisplayName = data - case "description": - var err error + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("description")) - data, err := ec.unmarshalOString2ᚖstring(ctx, v) - if err != nil { - return it, err + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - it.Description = data - } - } - - return it, nil -} - -func (ec *executionContext) unmarshalInputfilegroupinput(ctx context.Context, obj interface{}) (Filegroupinput, error) { - var it Filegroupinput - asMap := map[string]interface{}{} - for k, v := range obj.(map[string]interface{}) { - asMap[k] = v - } - fieldsInOrder := [...]string{"source", "path"} - for _, k := range fieldsInOrder { - v, ok := asMap[k] - if !ok { - continue - } - switch k { - case "source": - var err error + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "listDatasources": + field := field - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("source")) - data, err := ec.unmarshalNTypedObjectReferenceInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReferenceInput(ctx, v) - if err != nil { - return it, err + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._DatasourceQuery_listDatasources(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res } - it.Source = data - case "path": - var err error - ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("path")) - data, err := ec.unmarshalOString2ᚕstringᚄ(ctx, v) - if err != nil { - return it, err + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - it.Path = data + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + default: + panic("unknown field " + strconv.Quote(field.Name)) } } - - return it, nil -} - -// endregion **************************** input.gotpl ***************************** - -// region ************************** interface.gotpl *************************** - -func (ec *executionContext) _PageNode(ctx context.Context, sel ast.SelectionSet, obj PageNode) graphql.Marshaler { - switch obj := (obj).(type) { - case nil: + out.Dispatch(ctx) + if out.Invalids > 0 { return graphql.Null - case Datasource: - return ec._Datasource(ctx, sel, &obj) - case *Datasource: - if obj == nil { - return graphql.Null - } - return ec._Datasource(ctx, sel, obj) - case Model: - return ec._Model(ctx, sel, &obj) - case *Model: - if obj == nil { - return graphql.Null - } - return ec._Model(ctx, sel, obj) - case Embedder: - return ec._Embedder(ctx, sel, &obj) - case *Embedder: - if obj == nil { - return graphql.Null - } - return ec._Embedder(ctx, sel, obj) - case KnowledgeBase: - return ec._KnowledgeBase(ctx, sel, &obj) - case *KnowledgeBase: - if obj == nil { - return graphql.Null - } - return ec._KnowledgeBase(ctx, sel, obj) - default: - panic(fmt.Errorf("unexpected type %T", obj)) } -} -// endregion ************************** interface.gotpl *************************** + atomic.AddInt32(&ec.deferred, int32(len(deferred))) -// region **************************** object.gotpl **************************** + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } -var datasourceImplementors = []string{"Datasource", "PageNode"} + return out +} -func (ec *executionContext) _Datasource(ctx context.Context, sel ast.SelectionSet, obj *Datasource) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, datasourceImplementors) +var embedderImplementors = []string{"Embedder", "PageNode"} + +func (ec *executionContext) _Embedder(ctx context.Context, sel ast.SelectionSet, obj *Embedder) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, embedderImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("Datasource") + out.Values[i] = graphql.MarshalString("Embedder") case "name": - out.Values[i] = ec._Datasource_name(ctx, field, obj) + out.Values[i] = ec._Embedder_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "namespace": - out.Values[i] = ec._Datasource_namespace(ctx, field, obj) + out.Values[i] = ec._Embedder_namespace(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "labels": - out.Values[i] = ec._Datasource_labels(ctx, field, obj) + out.Values[i] = ec._Embedder_labels(ctx, field, obj) case "annotations": - out.Values[i] = ec._Datasource_annotations(ctx, field, obj) + out.Values[i] = ec._Embedder_annotations(ctx, field, obj) case "creator": - out.Values[i] = ec._Datasource_creator(ctx, field, obj) + out.Values[i] = ec._Embedder_creator(ctx, field, obj) case "displayName": - out.Values[i] = ec._Datasource_displayName(ctx, field, obj) + out.Values[i] = ec._Embedder_displayName(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "description": - out.Values[i] = ec._Datasource_description(ctx, field, obj) + out.Values[i] = ec._Embedder_description(ctx, field, obj) case "endpoint": - out.Values[i] = ec._Datasource_endpoint(ctx, field, obj) - case "oss": - out.Values[i] = ec._Datasource_oss(ctx, field, obj) - case "status": - out.Values[i] = ec._Datasource_status(ctx, field, obj) - case "fileCount": - out.Values[i] = ec._Datasource_fileCount(ctx, field, obj) + out.Values[i] = ec._Embedder_endpoint(ctx, field, obj) + case "serviceType": + out.Values[i] = ec._Embedder_serviceType(ctx, field, obj) case "updateTimestamp": - out.Values[i] = ec._Datasource_updateTimestamp(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } + out.Values[i] = ec._Embedder_updateTimestamp(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -9942,18 +14555,18 @@ func (ec *executionContext) _Datasource(ctx context.Context, sel ast.SelectionSe return out } -var datasourceMutationImplementors = []string{"DatasourceMutation"} +var embedderMutationImplementors = []string{"EmbedderMutation"} -func (ec *executionContext) _DatasourceMutation(ctx context.Context, sel ast.SelectionSet, obj *DatasourceMutation) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, datasourceMutationImplementors) +func (ec *executionContext) _EmbedderMutation(ctx context.Context, sel ast.SelectionSet, obj *EmbedderMutation) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, embedderMutationImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("DatasourceMutation") - case "createDatasource": + out.Values[i] = graphql.MarshalString("EmbedderMutation") + case "createEmbedder": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -9962,7 +14575,7 @@ func (ec *executionContext) _DatasourceMutation(ctx context.Context, sel ast.Sel ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._DatasourceMutation_createDatasource(ctx, field, obj) + res = ec._EmbedderMutation_createEmbedder(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -9989,7 +14602,7 @@ func (ec *executionContext) _DatasourceMutation(ctx context.Context, sel ast.Sel } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "updateDatasource": + case "updateEmbedder": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -9998,7 +14611,7 @@ func (ec *executionContext) _DatasourceMutation(ctx context.Context, sel ast.Sel ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._DatasourceMutation_updateDatasource(ctx, field, obj) + res = ec._EmbedderMutation_updateEmbedder(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -10025,7 +14638,7 @@ func (ec *executionContext) _DatasourceMutation(ctx context.Context, sel ast.Sel } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "deleteDatasource": + case "deleteEmbedder": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10034,7 +14647,7 @@ func (ec *executionContext) _DatasourceMutation(ctx context.Context, sel ast.Sel ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._DatasourceMutation_deleteDatasource(ctx, field, obj) + res = ec._EmbedderMutation_deleteEmbedder(ctx, field, obj) return res } @@ -10081,18 +14694,18 @@ func (ec *executionContext) _DatasourceMutation(ctx context.Context, sel ast.Sel return out } -var datasourceQueryImplementors = []string{"DatasourceQuery"} +var embedderQueryImplementors = []string{"EmbedderQuery"} -func (ec *executionContext) _DatasourceQuery(ctx context.Context, sel ast.SelectionSet, obj *DatasourceQuery) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, datasourceQueryImplementors) +func (ec *executionContext) _EmbedderQuery(ctx context.Context, sel ast.SelectionSet, obj *EmbedderQuery) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, embedderQueryImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("DatasourceQuery") - case "getDatasource": + out.Values[i] = graphql.MarshalString("EmbedderQuery") + case "getEmbedder": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10101,7 +14714,7 @@ func (ec *executionContext) _DatasourceQuery(ctx context.Context, sel ast.Select ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._DatasourceQuery_getDatasource(ctx, field, obj) + res = ec._EmbedderQuery_getEmbedder(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -10128,7 +14741,7 @@ func (ec *executionContext) _DatasourceQuery(ctx context.Context, sel ast.Select } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "listDatasources": + case "listEmbedders": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10137,7 +14750,7 @@ func (ec *executionContext) _DatasourceQuery(ctx context.Context, sel ast.Select ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._DatasourceQuery_listDatasources(ctx, field, obj) + res = ec._EmbedderQuery_listEmbedders(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -10187,46 +14800,141 @@ func (ec *executionContext) _DatasourceQuery(ctx context.Context, sel ast.Select return out } -var embedderImplementors = []string{"Embedder", "PageNode"} +var endpointImplementors = []string{"Endpoint"} -func (ec *executionContext) _Embedder(ctx context.Context, sel ast.SelectionSet, obj *Embedder) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, embedderImplementors) +func (ec *executionContext) _Endpoint(ctx context.Context, sel ast.SelectionSet, obj *Endpoint) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, endpointImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("Embedder") + out.Values[i] = graphql.MarshalString("Endpoint") + case "url": + out.Values[i] = ec._Endpoint_url(ctx, field, obj) + case "authSecret": + out.Values[i] = ec._Endpoint_authSecret(ctx, field, obj) + case "insecure": + out.Values[i] = ec._Endpoint_insecure(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var fImplementors = []string{"F", "PageNode"} + +func (ec *executionContext) _F(ctx context.Context, sel ast.SelectionSet, obj *F) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, fImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("F") + case "datasource": + out.Values[i] = ec._F_datasource(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "path": + out.Values[i] = ec._F_path(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "md5": + out.Values[i] = ec._F_md5(ctx, field, obj) + case "time": + out.Values[i] = ec._F_time(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var knowledgeBaseImplementors = []string{"KnowledgeBase", "PageNode"} + +func (ec *executionContext) _KnowledgeBase(ctx context.Context, sel ast.SelectionSet, obj *KnowledgeBase) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, knowledgeBaseImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("KnowledgeBase") case "name": - out.Values[i] = ec._Embedder_name(ctx, field, obj) + out.Values[i] = ec._KnowledgeBase_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "namespace": - out.Values[i] = ec._Embedder_namespace(ctx, field, obj) + out.Values[i] = ec._KnowledgeBase_namespace(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "labels": - out.Values[i] = ec._Embedder_labels(ctx, field, obj) + out.Values[i] = ec._KnowledgeBase_labels(ctx, field, obj) case "annotations": - out.Values[i] = ec._Embedder_annotations(ctx, field, obj) + out.Values[i] = ec._KnowledgeBase_annotations(ctx, field, obj) case "creator": - out.Values[i] = ec._Embedder_creator(ctx, field, obj) + out.Values[i] = ec._KnowledgeBase_creator(ctx, field, obj) case "displayName": - out.Values[i] = ec._Embedder_displayName(ctx, field, obj) + out.Values[i] = ec._KnowledgeBase_displayName(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "description": - out.Values[i] = ec._Embedder_description(ctx, field, obj) - case "endpoint": - out.Values[i] = ec._Embedder_endpoint(ctx, field, obj) - case "serviceType": - out.Values[i] = ec._Embedder_serviceType(ctx, field, obj) + out.Values[i] = ec._KnowledgeBase_description(ctx, field, obj) + case "embedder": + out.Values[i] = ec._KnowledgeBase_embedder(ctx, field, obj) + case "vectorStore": + out.Values[i] = ec._KnowledgeBase_vectorStore(ctx, field, obj) + case "fileGroups": + out.Values[i] = ec._KnowledgeBase_fileGroups(ctx, field, obj) + case "status": + out.Values[i] = ec._KnowledgeBase_status(ctx, field, obj) case "updateTimestamp": - out.Values[i] = ec._Embedder_updateTimestamp(ctx, field, obj) + out.Values[i] = ec._KnowledgeBase_updateTimestamp(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10250,18 +14958,18 @@ func (ec *executionContext) _Embedder(ctx context.Context, sel ast.SelectionSet, return out } -var embedderMutationImplementors = []string{"EmbedderMutation"} +var knowledgeBaseMutationImplementors = []string{"KnowledgeBaseMutation"} -func (ec *executionContext) _EmbedderMutation(ctx context.Context, sel ast.SelectionSet, obj *EmbedderMutation) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, embedderMutationImplementors) +func (ec *executionContext) _KnowledgeBaseMutation(ctx context.Context, sel ast.SelectionSet, obj *KnowledgeBaseMutation) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, knowledgeBaseMutationImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("EmbedderMutation") - case "createEmbedder": + out.Values[i] = graphql.MarshalString("KnowledgeBaseMutation") + case "createKnowledgeBase": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10270,7 +14978,7 @@ func (ec *executionContext) _EmbedderMutation(ctx context.Context, sel ast.Selec ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._EmbedderMutation_createEmbedder(ctx, field, obj) + res = ec._KnowledgeBaseMutation_createKnowledgeBase(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -10297,7 +15005,7 @@ func (ec *executionContext) _EmbedderMutation(ctx context.Context, sel ast.Selec } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "updateEmbedder": + case "updateKnowledgeBase": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10306,7 +15014,7 @@ func (ec *executionContext) _EmbedderMutation(ctx context.Context, sel ast.Selec ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._EmbedderMutation_updateEmbedder(ctx, field, obj) + res = ec._KnowledgeBaseMutation_updateKnowledgeBase(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -10333,7 +15041,7 @@ func (ec *executionContext) _EmbedderMutation(ctx context.Context, sel ast.Selec } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "deleteEmbedder": + case "deleteKnowledgeBase": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10342,7 +15050,7 @@ func (ec *executionContext) _EmbedderMutation(ctx context.Context, sel ast.Selec ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._EmbedderMutation_deleteEmbedder(ctx, field, obj) + res = ec._KnowledgeBaseMutation_deleteKnowledgeBase(ctx, field, obj) return res } @@ -10389,18 +15097,18 @@ func (ec *executionContext) _EmbedderMutation(ctx context.Context, sel ast.Selec return out } -var embedderQueryImplementors = []string{"EmbedderQuery"} +var knowledgeBaseQueryImplementors = []string{"KnowledgeBaseQuery"} -func (ec *executionContext) _EmbedderQuery(ctx context.Context, sel ast.SelectionSet, obj *EmbedderQuery) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, embedderQueryImplementors) +func (ec *executionContext) _KnowledgeBaseQuery(ctx context.Context, sel ast.SelectionSet, obj *KnowledgeBaseQuery) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, knowledgeBaseQueryImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("EmbedderQuery") - case "getEmbedder": + out.Values[i] = graphql.MarshalString("KnowledgeBaseQuery") + case "getKnowledgeBase": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10409,7 +15117,7 @@ func (ec *executionContext) _EmbedderQuery(ctx context.Context, sel ast.Selectio ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._EmbedderQuery_getEmbedder(ctx, field, obj) + res = ec._KnowledgeBaseQuery_getKnowledgeBase(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -10436,7 +15144,7 @@ func (ec *executionContext) _EmbedderQuery(ctx context.Context, sel ast.Selectio } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "listEmbedders": + case "listKnowledgeBases": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10445,7 +15153,7 @@ func (ec *executionContext) _EmbedderQuery(ctx context.Context, sel ast.Selectio ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._EmbedderQuery_listEmbedders(ctx, field, obj) + res = ec._KnowledgeBaseQuery_listKnowledgeBases(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -10495,93 +15203,52 @@ func (ec *executionContext) _EmbedderQuery(ctx context.Context, sel ast.Selectio return out } -var endpointImplementors = []string{"Endpoint"} - -func (ec *executionContext) _Endpoint(ctx context.Context, sel ast.SelectionSet, obj *Endpoint) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, endpointImplementors) - - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("Endpoint") - case "url": - out.Values[i] = ec._Endpoint_url(ctx, field, obj) - case "authSecret": - out.Values[i] = ec._Endpoint_authSecret(ctx, field, obj) - case "insecure": - out.Values[i] = ec._Endpoint_insecure(ctx, field, obj) - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null - } - - atomic.AddInt32(&ec.deferred, int32(len(deferred))) - - for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } - - return out -} - -var knowledgeBaseImplementors = []string{"KnowledgeBase", "PageNode"} +var modelImplementors = []string{"Model", "PageNode"} -func (ec *executionContext) _KnowledgeBase(ctx context.Context, sel ast.SelectionSet, obj *KnowledgeBase) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, knowledgeBaseImplementors) +func (ec *executionContext) _Model(ctx context.Context, sel ast.SelectionSet, obj *Model) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, modelImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("KnowledgeBase") + out.Values[i] = graphql.MarshalString("Model") case "name": - out.Values[i] = ec._KnowledgeBase_name(ctx, field, obj) + out.Values[i] = ec._Model_name(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "namespace": - out.Values[i] = ec._KnowledgeBase_namespace(ctx, field, obj) + out.Values[i] = ec._Model_namespace(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "labels": - out.Values[i] = ec._KnowledgeBase_labels(ctx, field, obj) + out.Values[i] = ec._Model_labels(ctx, field, obj) case "annotations": - out.Values[i] = ec._KnowledgeBase_annotations(ctx, field, obj) + out.Values[i] = ec._Model_annotations(ctx, field, obj) case "creator": - out.Values[i] = ec._KnowledgeBase_creator(ctx, field, obj) + out.Values[i] = ec._Model_creator(ctx, field, obj) case "displayName": - out.Values[i] = ec._KnowledgeBase_displayName(ctx, field, obj) + out.Values[i] = ec._Model_displayName(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } case "description": - out.Values[i] = ec._KnowledgeBase_description(ctx, field, obj) - case "embedder": - out.Values[i] = ec._KnowledgeBase_embedder(ctx, field, obj) - case "vectorStore": - out.Values[i] = ec._KnowledgeBase_vectorStore(ctx, field, obj) - case "fileGroups": - out.Values[i] = ec._KnowledgeBase_fileGroups(ctx, field, obj) - case "status": - out.Values[i] = ec._KnowledgeBase_status(ctx, field, obj) - case "updateTimestamp": - out.Values[i] = ec._KnowledgeBase_updateTimestamp(ctx, field, obj) + out.Values[i] = ec._Model_description(ctx, field, obj) + case "field": + out.Values[i] = ec._Model_field(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "modeltype": + out.Values[i] = ec._Model_modeltype(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } + case "updateTimestamp": + out.Values[i] = ec._Model_updateTimestamp(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10605,18 +15272,18 @@ func (ec *executionContext) _KnowledgeBase(ctx context.Context, sel ast.Selectio return out } -var knowledgeBaseMutationImplementors = []string{"KnowledgeBaseMutation"} +var modelMutationImplementors = []string{"ModelMutation"} -func (ec *executionContext) _KnowledgeBaseMutation(ctx context.Context, sel ast.SelectionSet, obj *KnowledgeBaseMutation) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, knowledgeBaseMutationImplementors) +func (ec *executionContext) _ModelMutation(ctx context.Context, sel ast.SelectionSet, obj *ModelMutation) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, modelMutationImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("KnowledgeBaseMutation") - case "createKnowledgeBase": + out.Values[i] = graphql.MarshalString("ModelMutation") + case "createModel": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10625,7 +15292,7 @@ func (ec *executionContext) _KnowledgeBaseMutation(ctx context.Context, sel ast. ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._KnowledgeBaseMutation_createKnowledgeBase(ctx, field, obj) + res = ec._ModelMutation_createModel(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -10652,7 +15319,7 @@ func (ec *executionContext) _KnowledgeBaseMutation(ctx context.Context, sel ast. } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "updateKnowledgeBase": + case "updateModel": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10661,7 +15328,7 @@ func (ec *executionContext) _KnowledgeBaseMutation(ctx context.Context, sel ast. ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._KnowledgeBaseMutation_updateKnowledgeBase(ctx, field, obj) + res = ec._ModelMutation_updateModel(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -10688,7 +15355,7 @@ func (ec *executionContext) _KnowledgeBaseMutation(ctx context.Context, sel ast. } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "deleteKnowledgeBase": + case "deleteModel": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10697,7 +15364,7 @@ func (ec *executionContext) _KnowledgeBaseMutation(ctx context.Context, sel ast. ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._KnowledgeBaseMutation_deleteKnowledgeBase(ctx, field, obj) + res = ec._ModelMutation_deleteModel(ctx, field, obj) return res } @@ -10744,18 +15411,18 @@ func (ec *executionContext) _KnowledgeBaseMutation(ctx context.Context, sel ast. return out } -var knowledgeBaseQueryImplementors = []string{"KnowledgeBaseQuery"} +var modelQueryImplementors = []string{"ModelQuery"} -func (ec *executionContext) _KnowledgeBaseQuery(ctx context.Context, sel ast.SelectionSet, obj *KnowledgeBaseQuery) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, knowledgeBaseQueryImplementors) +func (ec *executionContext) _ModelQuery(ctx context.Context, sel ast.SelectionSet, obj *ModelQuery) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, modelQueryImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("KnowledgeBaseQuery") - case "getKnowledgeBase": + out.Values[i] = graphql.MarshalString("ModelQuery") + case "getModel": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10764,7 +15431,7 @@ func (ec *executionContext) _KnowledgeBaseQuery(ctx context.Context, sel ast.Sel ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._KnowledgeBaseQuery_getKnowledgeBase(ctx, field, obj) + res = ec._ModelQuery_getModel(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -10791,7 +15458,7 @@ func (ec *executionContext) _KnowledgeBaseQuery(ctx context.Context, sel ast.Sel } out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "listKnowledgeBases": + case "listModels": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10800,7 +15467,7 @@ func (ec *executionContext) _KnowledgeBaseQuery(ctx context.Context, sel ast.Sel ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._KnowledgeBaseQuery_listKnowledgeBases(ctx, field, obj) + res = ec._ModelQuery_listModels(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } @@ -10850,52 +15517,144 @@ func (ec *executionContext) _KnowledgeBaseQuery(ctx context.Context, sel ast.Sel return out } -var modelImplementors = []string{"Model", "PageNode"} +var mutationImplementors = []string{"Mutation"} + +func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Mutation", + }) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ + Object: field.Name, + Field: field, + }) + + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Mutation") + case "hello": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_hello(ctx, field) + }) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "Dataset": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_Dataset(ctx, field) + }) + case "Datasource": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_Datasource(ctx, field) + }) + case "Embedder": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_Embedder(ctx, field) + }) + case "KnowledgeBase": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_KnowledgeBase(ctx, field) + }) + case "Model": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_Model(ctx, field) + }) + case "VersionedDataset": + out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { + return ec._Mutation_VersionedDataset(ctx, field) + }) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var ossImplementors = []string{"Oss"} + +func (ec *executionContext) _Oss(ctx context.Context, sel ast.SelectionSet, obj *Oss) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, ossImplementors) + + out := graphql.NewFieldSet(fields) + deferred := make(map[string]*graphql.FieldSet) + for i, field := range fields { + switch field.Name { + case "__typename": + out.Values[i] = graphql.MarshalString("Oss") + case "bucket": + out.Values[i] = ec._Oss_bucket(ctx, field, obj) + case "Object": + out.Values[i] = ec._Oss_Object(ctx, field, obj) + default: + panic("unknown field " + strconv.Quote(field.Name)) + } + } + out.Dispatch(ctx) + if out.Invalids > 0 { + return graphql.Null + } + + atomic.AddInt32(&ec.deferred, int32(len(deferred))) + + for label, dfs := range deferred { + ec.processDeferredGroup(graphql.DeferredGroup{ + Label: label, + Path: graphql.GetPath(ctx), + FieldSet: dfs, + Context: ctx, + }) + } + + return out +} + +var paginatedResultImplementors = []string{"PaginatedResult"} -func (ec *executionContext) _Model(ctx context.Context, sel ast.SelectionSet, obj *Model) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, modelImplementors) +func (ec *executionContext) _PaginatedResult(ctx context.Context, sel ast.SelectionSet, obj *PaginatedResult) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, paginatedResultImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("Model") - case "name": - out.Values[i] = ec._Model_name(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "namespace": - out.Values[i] = ec._Model_namespace(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "labels": - out.Values[i] = ec._Model_labels(ctx, field, obj) - case "annotations": - out.Values[i] = ec._Model_annotations(ctx, field, obj) - case "creator": - out.Values[i] = ec._Model_creator(ctx, field, obj) - case "displayName": - out.Values[i] = ec._Model_displayName(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ - } - case "description": - out.Values[i] = ec._Model_description(ctx, field, obj) - case "field": - out.Values[i] = ec._Model_field(ctx, field, obj) + out.Values[i] = graphql.MarshalString("PaginatedResult") + case "hasNextPage": + out.Values[i] = ec._PaginatedResult_hasNextPage(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "modeltype": - out.Values[i] = ec._Model_modeltype(ctx, field, obj) + case "nodes": + out.Values[i] = ec._PaginatedResult_nodes(ctx, field, obj) + case "page": + out.Values[i] = ec._PaginatedResult_page(ctx, field, obj) + case "pageSize": + out.Values[i] = ec._PaginatedResult_pageSize(ctx, field, obj) + case "totalCount": + out.Values[i] = ec._PaginatedResult_totalCount(ctx, field, obj) if out.Values[i] == graphql.Null { out.Invalids++ } - case "updateTimestamp": - out.Values[i] = ec._Model_updateTimestamp(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -10919,18 +15678,26 @@ func (ec *executionContext) _Model(ctx context.Context, sel ast.SelectionSet, ob return out } -var modelMutationImplementors = []string{"ModelMutation"} +var queryImplementors = []string{"Query"} -func (ec *executionContext) _ModelMutation(ctx context.Context, sel ast.SelectionSet, obj *ModelMutation) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, modelMutationImplementors) +func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) + ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ + Object: "Query", + }) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { + innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ + Object: field.Name, + Field: field, + }) + switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("ModelMutation") - case "createModel": + out.Values[i] = graphql.MarshalString("Query") + case "hello": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10939,34 +15706,20 @@ func (ec *executionContext) _ModelMutation(ctx context.Context, sel ast.Selectio ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ModelMutation_createModel(ctx, field, obj) + res = ec._Query_hello(ctx, field) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "updateModel": + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "Dataset": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -10975,34 +15728,17 @@ func (ec *executionContext) _ModelMutation(ctx context.Context, sel ast.Selectio ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ModelMutation_updateModel(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } + res = ec._Query_Dataset(ctx, field) return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "deleteModel": + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "Datasource": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -11011,65 +15747,17 @@ func (ec *executionContext) _ModelMutation(ctx context.Context, sel ast.Selectio ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ModelMutation_deleteModel(ctx, field, obj) + res = ec._Query_Datasource(ctx, field) return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null - } - - atomic.AddInt32(&ec.deferred, int32(len(deferred))) - - for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } - - return out -} - -var modelQueryImplementors = []string{"ModelQuery"} - -func (ec *executionContext) _ModelQuery(ctx context.Context, sel ast.SelectionSet, obj *ModelQuery) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, modelQueryImplementors) - - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("ModelQuery") - case "getModel": + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "Embedder": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -11078,34 +15766,17 @@ func (ec *executionContext) _ModelQuery(ctx context.Context, sel ast.SelectionSe ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ModelQuery_getModel(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } + res = ec._Query_Embedder(ctx, field) return res } - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - case "listModels": + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "KnowledgeBase": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -11114,97 +15785,61 @@ func (ec *executionContext) _ModelQuery(ctx context.Context, sel ast.SelectionSe ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._ModelQuery_listModels(ctx, field, obj) - if res == graphql.Null { - atomic.AddUint32(&fs.Invalids, 1) - } + res = ec._Query_KnowledgeBase(ctx, field) return res - } - - if field.Deferrable != nil { - dfs, ok := deferred[field.Deferrable.Label] - di := 0 - if ok { - dfs.AddField(field) - di = len(dfs.Values) - 1 - } else { - dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) - deferred[field.Deferrable.Label] = dfs - } - dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { - return innerFunc(ctx, dfs) - }) - - // don't run the out.Concurrently() call below - out.Values[i] = graphql.Null - continue - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - default: - panic("unknown field " + strconv.Quote(field.Name)) - } - } - out.Dispatch(ctx) - if out.Invalids > 0 { - return graphql.Null - } - - atomic.AddInt32(&ec.deferred, int32(len(deferred))) - - for label, dfs := range deferred { - ec.processDeferredGroup(graphql.DeferredGroup{ - Label: label, - Path: graphql.GetPath(ctx), - FieldSet: dfs, - Context: ctx, - }) - } + } - return out -} + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } -var mutationImplementors = []string{"Mutation"} + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "Model": + field := field -func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, mutationImplementors) - ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ - Object: "Mutation", - }) + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_Model(ctx, field) + return res + } - out := graphql.NewFieldSet(fields) - deferred := make(map[string]*graphql.FieldSet) - for i, field := range fields { - innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ - Object: field.Name, - Field: field, - }) + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } - switch field.Name { - case "__typename": - out.Values[i] = graphql.MarshalString("Mutation") - case "hello": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_hello(ctx, field) - }) - if out.Values[i] == graphql.Null { - out.Invalids++ + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "VersionedDataset": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._Query_VersionedDataset(ctx, field) + return res } - case "Datasource": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_Datasource(ctx, field) - }) - case "Embedder": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_Embedder(ctx, field) - }) - case "KnowledgeBase": + + rrm := func(ctx context.Context) graphql.Marshaler { + return ec.OperationContext.RootResolverMiddleware(ctx, + func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) + case "__type": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_KnowledgeBase(ctx, field) + return ec._Query___type(ctx, field) }) - case "Model": + case "__schema": out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Mutation_Model(ctx, field) + return ec._Query___schema(ctx, field) }) default: panic("unknown field " + strconv.Quote(field.Name)) @@ -11229,21 +15864,31 @@ func (ec *executionContext) _Mutation(ctx context.Context, sel ast.SelectionSet) return out } -var ossImplementors = []string{"Oss"} +var typedObjectReferenceImplementors = []string{"TypedObjectReference"} -func (ec *executionContext) _Oss(ctx context.Context, sel ast.SelectionSet, obj *Oss) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, ossImplementors) +func (ec *executionContext) _TypedObjectReference(ctx context.Context, sel ast.SelectionSet, obj *TypedObjectReference) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, typedObjectReferenceImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("Oss") - case "bucket": - out.Values[i] = ec._Oss_bucket(ctx, field, obj) - case "Object": - out.Values[i] = ec._Oss_Object(ctx, field, obj) + out.Values[i] = graphql.MarshalString("TypedObjectReference") + case "apiGroup": + out.Values[i] = ec._TypedObjectReference_apiGroup(ctx, field, obj) + case "kind": + out.Values[i] = ec._TypedObjectReference_kind(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "Name": + out.Values[i] = ec._TypedObjectReference_Name(ctx, field, obj) + if out.Values[i] == graphql.Null { + out.Invalids++ + } + case "Namespace": + out.Values[i] = ec._TypedObjectReference_Namespace(ctx, field, obj) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -11267,32 +15912,100 @@ func (ec *executionContext) _Oss(ctx context.Context, sel ast.SelectionSet, obj return out } -var paginatedResultImplementors = []string{"PaginatedResult"} +var versionedDatasetImplementors = []string{"VersionedDataset", "PageNode"} -func (ec *executionContext) _PaginatedResult(ctx context.Context, sel ast.SelectionSet, obj *PaginatedResult) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, paginatedResultImplementors) +func (ec *executionContext) _VersionedDataset(ctx context.Context, sel ast.SelectionSet, obj *VersionedDataset) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, versionedDatasetImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("PaginatedResult") - case "hasNextPage": - out.Values[i] = ec._PaginatedResult_hasNextPage(ctx, field, obj) + out.Values[i] = graphql.MarshalString("VersionedDataset") + case "name": + out.Values[i] = ec._VersionedDataset_name(ctx, field, obj) if out.Values[i] == graphql.Null { - out.Invalids++ + atomic.AddUint32(&out.Invalids, 1) } - case "nodes": - out.Values[i] = ec._PaginatedResult_nodes(ctx, field, obj) - case "page": - out.Values[i] = ec._PaginatedResult_page(ctx, field, obj) - case "pageSize": - out.Values[i] = ec._PaginatedResult_pageSize(ctx, field, obj) - case "totalCount": - out.Values[i] = ec._PaginatedResult_totalCount(ctx, field, obj) + case "namespace": + out.Values[i] = ec._VersionedDataset_namespace(ctx, field, obj) if out.Values[i] == graphql.Null { - out.Invalids++ + atomic.AddUint32(&out.Invalids, 1) + } + case "labels": + out.Values[i] = ec._VersionedDataset_labels(ctx, field, obj) + case "annotations": + out.Values[i] = ec._VersionedDataset_annotations(ctx, field, obj) + case "creator": + out.Values[i] = ec._VersionedDataset_creator(ctx, field, obj) + case "displayName": + out.Values[i] = ec._VersionedDataset_displayName(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "dataset": + out.Values[i] = ec._VersionedDataset_dataset(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "updateTimestamp": + out.Values[i] = ec._VersionedDataset_updateTimestamp(ctx, field, obj) + case "creationTimestamp": + out.Values[i] = ec._VersionedDataset_creationTimestamp(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "files": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._VersionedDataset_files(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "version": + out.Values[i] = ec._VersionedDataset_version(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "fileCount": + out.Values[i] = ec._VersionedDataset_fileCount(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) + } + case "released": + out.Values[i] = ec._VersionedDataset_released(ctx, field, obj) + if out.Values[i] == graphql.Null { + atomic.AddUint32(&out.Invalids, 1) } default: panic("unknown field " + strconv.Quote(field.Name)) @@ -11317,26 +16030,18 @@ func (ec *executionContext) _PaginatedResult(ctx context.Context, sel ast.Select return out } -var queryImplementors = []string{"Query"} +var versionedDatasetMutationImplementors = []string{"VersionedDatasetMutation"} -func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors) - ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{ - Object: "Query", - }) +func (ec *executionContext) _VersionedDatasetMutation(ctx context.Context, sel ast.SelectionSet, obj *VersionedDatasetMutation) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, versionedDatasetMutationImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { - innerCtx := graphql.WithRootFieldContext(ctx, &graphql.RootFieldContext{ - Object: field.Name, - Field: field, - }) - switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("Query") - case "hello": + out.Values[i] = graphql.MarshalString("VersionedDatasetMutation") + case "createVersionedDataset": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -11345,39 +16050,34 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_hello(ctx, field) + res = ec._VersionedDatasetMutation_createVersionedDataset(ctx, field, obj) if res == graphql.Null { atomic.AddUint32(&fs.Invalids, 1) } return res } - rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, - func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "Datasource": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Query_Datasource(ctx, field) - return res - } + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, - func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "Embedder": + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "updateVersionedDataset": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -11386,36 +16086,34 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_Embedder(ctx, field) + res = ec._VersionedDatasetMutation_updateVersionedDataset(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } return res } - rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, - func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) - } - - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "KnowledgeBase": - field := field - - innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { - defer func() { - if r := recover(); r != nil { - ec.Error(ctx, ec.Recover(ctx, r)) - } - }() - res = ec._Query_KnowledgeBase(ctx, field) - return res - } + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) - rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, - func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "Model": + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "deleteVersionedDatasets": field := field innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { @@ -11424,24 +16122,30 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr ec.Error(ctx, ec.Recover(ctx, r)) } }() - res = ec._Query_Model(ctx, field) + res = ec._VersionedDatasetMutation_deleteVersionedDatasets(ctx, field, obj) return res } - rrm := func(ctx context.Context) graphql.Marshaler { - return ec.OperationContext.RootResolverMiddleware(ctx, - func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return rrm(innerCtx) }) - case "__type": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Query___type(ctx, field) - }) - case "__schema": - out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) { - return ec._Query___schema(ctx, field) - }) + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -11465,31 +16169,89 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr return out } -var typedObjectReferenceImplementors = []string{"TypedObjectReference"} +var versionedDatasetQueryImplementors = []string{"VersionedDatasetQuery"} -func (ec *executionContext) _TypedObjectReference(ctx context.Context, sel ast.SelectionSet, obj *TypedObjectReference) graphql.Marshaler { - fields := graphql.CollectFields(ec.OperationContext, sel, typedObjectReferenceImplementors) +func (ec *executionContext) _VersionedDatasetQuery(ctx context.Context, sel ast.SelectionSet, obj *VersionedDatasetQuery) graphql.Marshaler { + fields := graphql.CollectFields(ec.OperationContext, sel, versionedDatasetQueryImplementors) out := graphql.NewFieldSet(fields) deferred := make(map[string]*graphql.FieldSet) for i, field := range fields { switch field.Name { case "__typename": - out.Values[i] = graphql.MarshalString("TypedObjectReference") - case "apiGroup": - out.Values[i] = ec._TypedObjectReference_apiGroup(ctx, field, obj) - case "kind": - out.Values[i] = ec._TypedObjectReference_kind(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ + out.Values[i] = graphql.MarshalString("VersionedDatasetQuery") + case "getVersionedDataset": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._VersionedDatasetQuery_getVersionedDataset(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res } - case "Name": - out.Values[i] = ec._TypedObjectReference_Name(ctx, field, obj) - if out.Values[i] == graphql.Null { - out.Invalids++ + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue } - case "Namespace": - out.Values[i] = ec._TypedObjectReference_Namespace(ctx, field, obj) + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) + case "listVersionedDatasets": + field := field + + innerFunc := func(ctx context.Context, fs *graphql.FieldSet) (res graphql.Marshaler) { + defer func() { + if r := recover(); r != nil { + ec.Error(ctx, ec.Recover(ctx, r)) + } + }() + res = ec._VersionedDatasetQuery_listVersionedDatasets(ctx, field, obj) + if res == graphql.Null { + atomic.AddUint32(&fs.Invalids, 1) + } + return res + } + + if field.Deferrable != nil { + dfs, ok := deferred[field.Deferrable.Label] + di := 0 + if ok { + dfs.AddField(field) + di = len(dfs.Values) - 1 + } else { + dfs = graphql.NewFieldSet([]graphql.CollectedField{field}) + deferred[field.Deferrable.Label] = dfs + } + dfs.Concurrently(di, func(ctx context.Context) graphql.Marshaler { + return innerFunc(ctx, dfs) + }) + + // don't run the out.Concurrently() call below + out.Values[i] = graphql.Null + continue + } + + out.Concurrently(i, func(ctx context.Context) graphql.Marshaler { return innerFunc(ctx, out) }) default: panic("unknown field " + strconv.Quote(field.Name)) } @@ -11912,6 +16674,25 @@ func (ec *executionContext) unmarshalNCreateModelInput2githubᚗcomᚋkubeagiᚋ return res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalNCreateVersionedDatasetInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐCreateVersionedDatasetInput(ctx context.Context, v interface{}) (CreateVersionedDatasetInput, error) { + res, err := ec.unmarshalInputCreateVersionedDatasetInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNDataset2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDataset(ctx context.Context, sel ast.SelectionSet, v Dataset) graphql.Marshaler { + return ec._Dataset(ctx, sel, &v) +} + +func (ec *executionContext) marshalNDataset2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDataset(ctx context.Context, sel ast.SelectionSet, v *Dataset) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._Dataset(ctx, sel, v) +} + func (ec *executionContext) marshalNDatasource2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasource(ctx context.Context, sel ast.SelectionSet, v Datasource) graphql.Marshaler { return ec._Datasource(ctx, sel, &v) } @@ -11926,6 +16707,11 @@ func (ec *executionContext) marshalNDatasource2ᚖgithubᚗcomᚋkubeagiᚋarcad return ec._Datasource(ctx, sel, v) } +func (ec *executionContext) unmarshalNDeleteVersionedDatasetInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDeleteVersionedDatasetInput(ctx context.Context, v interface{}) (DeleteVersionedDatasetInput, error) { + res, err := ec.unmarshalInputDeleteVersionedDatasetInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalNEmbedder2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐEmbedder(ctx context.Context, sel ast.SelectionSet, v Embedder) graphql.Marshaler { return ec._Embedder(ctx, sel, &v) } @@ -11940,6 +16726,11 @@ func (ec *executionContext) marshalNEmbedder2ᚖgithubᚗcomᚋkubeagiᚋarcadia return ec._Embedder(ctx, sel, v) } +func (ec *executionContext) unmarshalNFileGroup2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFileGroup(ctx context.Context, v interface{}) (*FileGroup, error) { + res, err := ec.unmarshalInputFileGroup(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalNInt2int(ctx context.Context, v interface{}) (int, error) { res, err := graphql.UnmarshalInt(v) return res, graphql.ErrorOnPath(ctx, err) @@ -11989,6 +16780,11 @@ func (ec *executionContext) unmarshalNListModelInput2githubᚗcomᚋkubeagiᚋar return res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalNListVersionedDatasetInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐListVersionedDatasetInput(ctx context.Context, v interface{}) (ListVersionedDatasetInput, error) { + res, err := ec.unmarshalInputListVersionedDatasetInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) marshalNModel2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐModel(ctx context.Context, sel ast.SelectionSet, v Model) graphql.Marshaler { return ec._Model(ctx, sel, &v) } @@ -12057,11 +16853,34 @@ func (ec *executionContext) marshalNTime2timeᚐTime(ctx context.Context, sel as return res } +func (ec *executionContext) marshalNTypedObjectReference2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReference(ctx context.Context, sel ast.SelectionSet, v TypedObjectReference) graphql.Marshaler { + return ec._TypedObjectReference(ctx, sel, &v) +} + func (ec *executionContext) unmarshalNTypedObjectReferenceInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐTypedObjectReferenceInput(ctx context.Context, v interface{}) (TypedObjectReferenceInput, error) { res, err := ec.unmarshalInputTypedObjectReferenceInput(ctx, v) return res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalNUpdateVersionedDatasetInput2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐUpdateVersionedDatasetInput(ctx context.Context, v interface{}) (UpdateVersionedDatasetInput, error) { + res, err := ec.unmarshalInputUpdateVersionedDatasetInput(ctx, v) + return res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalNVersionedDataset2githubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐVersionedDataset(ctx context.Context, sel ast.SelectionSet, v VersionedDataset) graphql.Marshaler { + return ec._VersionedDataset(ctx, sel, &v) +} + +func (ec *executionContext) marshalNVersionedDataset2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐVersionedDataset(ctx context.Context, sel ast.SelectionSet, v *VersionedDataset) graphql.Marshaler { + if v == nil { + if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { + ec.Errorf(ctx, "the requested element is null which the schema does not allow") + } + return graphql.Null + } + return ec._VersionedDataset(ctx, sel, v) +} + func (ec *executionContext) marshalN__Directive2githubᚗcomᚋ99designsᚋgqlgenᚋgraphqlᚋintrospectionᚐDirective(ctx context.Context, sel ast.SelectionSet, v introspection.Directive) graphql.Marshaler { return ec.___Directive(ctx, sel, &v) } @@ -12346,6 +17165,28 @@ func (ec *executionContext) marshalOBoolean2ᚖbool(ctx context.Context, sel ast return res } +func (ec *executionContext) unmarshalOCreateDatasetInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐCreateDatasetInput(ctx context.Context, v interface{}) (*CreateDatasetInput, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputCreateDatasetInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) marshalODatasetMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasetMutation(ctx context.Context, sel ast.SelectionSet, v *DatasetMutation) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._DatasetMutation(ctx, sel, v) +} + +func (ec *executionContext) marshalODatasetQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasetQuery(ctx context.Context, sel ast.SelectionSet, v *DatasetQuery) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._DatasetQuery(ctx, sel, v) +} + func (ec *executionContext) marshalODatasourceMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDatasourceMutation(ctx context.Context, sel ast.SelectionSet, v *DatasourceMutation) graphql.Marshaler { if v == nil { return graphql.Null @@ -12360,6 +17201,14 @@ func (ec *executionContext) marshalODatasourceQuery2ᚖgithubᚗcomᚋkubeagiᚋ return ec._DatasourceQuery(ctx, sel, v) } +func (ec *executionContext) unmarshalODeleteDatasetInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDeleteDatasetInput(ctx context.Context, v interface{}) (*DeleteDatasetInput, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputDeleteDatasetInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalODeleteDatasourceInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐDeleteDatasourceInput(ctx context.Context, v interface{}) (*DeleteDatasourceInput, error) { if v == nil { return nil, nil @@ -12421,6 +17270,62 @@ func (ec *executionContext) unmarshalOEndpointInput2ᚖgithubᚗcomᚋkubeagiᚋ return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalOFileFilter2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFileFilter(ctx context.Context, v interface{}) (*FileFilter, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputFileFilter(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + +func (ec *executionContext) unmarshalOFileGroup2ᚕᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFileGroup(ctx context.Context, v interface{}) ([]*FileGroup, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*FileGroup, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalOFileGroup2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFileGroup(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) unmarshalOFileGroup2ᚕᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFileGroupᚄ(ctx context.Context, v interface{}) ([]*FileGroup, error) { + if v == nil { + return nil, nil + } + var vSlice []interface{} + if v != nil { + vSlice = graphql.CoerceList(v) + } + var err error + res := make([]*FileGroup, len(vSlice)) + for i := range vSlice { + ctx := graphql.WithPathContext(ctx, graphql.NewPathWithIndex(i)) + res[i], err = ec.unmarshalNFileGroup2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFileGroup(ctx, vSlice[i]) + if err != nil { + return nil, err + } + } + return res, nil +} + +func (ec *executionContext) unmarshalOFileGroup2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐFileGroup(ctx context.Context, v interface{}) (*FileGroup, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputFileGroup(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalOInt2ᚖint(ctx context.Context, v interface{}) (*int, error) { if v == nil { return nil, nil @@ -12451,6 +17356,14 @@ func (ec *executionContext) marshalOKnowledgeBaseQuery2ᚖgithubᚗcomᚋkubeagi return ec._KnowledgeBaseQuery(ctx, sel, v) } +func (ec *executionContext) unmarshalOListDatasetInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐListDatasetInput(ctx context.Context, v interface{}) (*ListDatasetInput, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputListDatasetInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalOMap2map(ctx context.Context, v interface{}) (map[string]interface{}, error) { if v == nil { return nil, nil @@ -12628,6 +17541,14 @@ func (ec *executionContext) unmarshalOTypedObjectReferenceInput2ᚖgithubᚗcom return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) unmarshalOUpdateDatasetInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐUpdateDatasetInput(ctx context.Context, v interface{}) (*UpdateDatasetInput, error) { + if v == nil { + return nil, nil + } + res, err := ec.unmarshalInputUpdateDatasetInput(ctx, v) + return &res, graphql.ErrorOnPath(ctx, err) +} + func (ec *executionContext) unmarshalOUpdateDatasourceInput2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐUpdateDatasourceInput(ctx context.Context, v interface{}) (*UpdateDatasourceInput, error) { if v == nil { return nil, nil @@ -12660,6 +17581,20 @@ func (ec *executionContext) unmarshalOUpdateModelInput2ᚖgithubᚗcomᚋkubeagi return &res, graphql.ErrorOnPath(ctx, err) } +func (ec *executionContext) marshalOVersionedDatasetMutation2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐVersionedDatasetMutation(ctx context.Context, sel ast.SelectionSet, v *VersionedDatasetMutation) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._VersionedDatasetMutation(ctx, sel, v) +} + +func (ec *executionContext) marshalOVersionedDatasetQuery2ᚖgithubᚗcomᚋkubeagiᚋarcadiaᚋgraphqlᚑserverᚋgoᚑserverᚋgraphᚋgeneratedᚐVersionedDatasetQuery(ctx context.Context, sel ast.SelectionSet, v *VersionedDatasetQuery) graphql.Marshaler { + if v == nil { + return graphql.Null + } + return ec._VersionedDatasetQuery(ctx, sel, v) +} + func (ec *executionContext) unmarshalOVoid2ᚖstring(ctx context.Context, v interface{}) (*string, error) { if v == nil { return nil, nil diff --git a/graphql-server/go-server/graph/generated/models_gen.go b/graphql-server/go-server/graph/generated/models_gen.go index a357e1860..444ce6f05 100644 --- a/graphql-server/go-server/graph/generated/models_gen.go +++ b/graphql-server/go-server/graph/generated/models_gen.go @@ -10,6 +10,24 @@ type PageNode interface { IsPageNode() } +type CreateDatasetInput struct { + // 数据集的CR名字,要满足k8s的名称规则 + Name string `json:"name"` + Namespace string `json:"namespace"` + // 一些标签选择信息,可以不添加 + Labels map[string]interface{} `json:"labels,omitempty"` + // 一些备注用的注视信息,或者记录一个简单的配置 + Annotations map[string]interface{} `json:"annotations,omitempty"` + // 展示名称,用于展示在界面上的,必须填写 + DisplayName string `json:"displayName"` + // 描述信息,可以不写 + Description *string `json:"description,omitempty"` + // 数据集里面的数据的类型,文本,视频,图片 + ContentType string `json:"contentType"` + // 应用场景,可以为空 + Filed *string `json:"filed,omitempty"` +} + // 新增数据源时输入条件 type CreateDatasourceInput struct { // 数据源资源名称(不可同名) @@ -83,6 +101,89 @@ type CreateModelInput struct { Modeltype string `json:"modeltype"` } +type CreateVersionedDatasetInput struct { + // 数据集的CR名字,要满足k8s的名称规则 + Name string `json:"name"` + Namespace string `json:"namespace"` + // dataset的名字,需要根据这个名字, + // 判断是否最新版本不包含任何文件(产品要求,有一个不包含任何文件的版本,不允许创建新的版本) + DatasetName string `json:"datasetName"` + // 一些标签选择信息,可以不添加 + Labels map[string]interface{} `json:"labels,omitempty"` + // 一些备注用的注视信息,或者记录一个简单的配置 + Annotations map[string]interface{} `json:"annotations,omitempty"` + // 展示名称,用于展示在界面上的,必须填写 + DisplayName string `json:"displayName"` + // 描述信息,可以不写 + Description *string `json:"description,omitempty"` + // 数据集里面的数据的类型,文本,视频,图片 + Version string `json:"version"` + // 是否发布,0是未发布,1是已经发布,创建一个版本的时候默认传递0就可以 + Release int `json:"release"` + FileGrups []*FileGroup `json:"fileGrups,omitempty"` +} + +// Dataset +// 数据集代表用户纳管的一组相似属性的文件,采用相同的方式进行数据处理并用于后续的 +// 1. 模型训练 +// 2. 知识库 +// +// 支持多种类型数据: +// - 文本 +// - 图片 +// - 视频 +// +// 单个数据集仅允许包含同一类型文件,不同类型文件将被忽略 +// 数据集允许有多个版本,数据处理针对单个版本进行 +// 数据集某个版本完成数据处理后,数据处理服务需要将处理后的存储回 版本数据集 +type Dataset struct { + // 数据集名称 + Name string `json:"name"` + // 数据集所在的namespace,也是后续桶的名字 + Namespace string `json:"namespace"` + // 一些用于标记,选择的的标签 + Labels map[string]interface{} `json:"labels,omitempty"` + // 添加一些辅助性记录信息 + Annotations map[string]interface{} `json:"annotations,omitempty"` + // 创建者,正查给你这个字段是不需要人写的,自动添加 + Creator *string `json:"creator,omitempty"` + // 展示名字, 与metadat.name不一样,这个展示名字是可以用中文的 + DisplayName string `json:"displayName"` + // 更新时间, 这里更新指文件同步,或者数据处理完成后,做的更新操作的时间 + UpdateTimestamp *time.Time `json:"updateTimestamp,omitempty"` + // 数据集类型,文本,图片,视频 + ContentType string `json:"contentType"` + // 应用场景 + Field *string `json:"field,omitempty"` + // 这个是一个resolver,数据集下面的版本列表。 + // 支持对名字,类型的完全匹配过滤。 + // 支持通过标签(somelabel=abc),字段(metadata.name=abc)进行过滤 + Versions PaginatedResult `json:"versions"` + // 数据集的总版本数量 + VersionCount int `json:"versionCount"` +} + +func (Dataset) IsPageNode() {} + +type DatasetMutation struct { + CreateDataset Dataset `json:"createDataset"` + UpdateDataset Dataset `json:"updateDataset"` + // 删除数据集 + // 可以提供一个名称列表,会将所有名字在这个列表的dataset全部删除 + // 支持通过标签进行删除,提供一个标签选择器,将满足标签的dataset全部删除 + // 如果提供了这两个参数,以名字列表为主。 + DeleteDatasets *string `json:"deleteDatasets,omitempty"` +} + +type DatasetQuery struct { + // 根据名字获取某个具体的数据集 + GetDataset Dataset `json:"getDataset"` + // 获取数据集列表,支持通过标签和字段进行选择。 + // labelSelector: aa=bbb + // fieldSelector= metadata.name=somename + ListDatasets PaginatedResult `json:"listDatasets"` +} + type Datasource struct { Name string `json:"name"` Namespace string `json:"namespace"` @@ -111,6 +212,13 @@ type DatasourceQuery struct { ListDatasources PaginatedResult `json:"listDatasources"` } +type DeleteDatasetInput struct { + Name *string `json:"name,omitempty"` + Namespace string `json:"namespace"` + LabelSelector *string `json:"labelSelector,omitempty"` + FieldSelector *string `json:"fieldSelector,omitempty"` +} + type DeleteDatasourceInput struct { Name *string `json:"name,omitempty"` Namespace string `json:"namespace"` @@ -146,6 +254,13 @@ type DeleteModelInput struct { FieldSelector *string `json:"fieldSelector,omitempty"` } +type DeleteVersionedDatasetInput struct { + Name *string `json:"name,omitempty"` + Namespace string `json:"namespace"` + LabelSelector *string `json:"labelSelector,omitempty"` + FieldSelector *string `json:"fieldSelector,omitempty"` +} + type Embedder struct { Name string `json:"name"` Namespace string `json:"namespace"` @@ -187,6 +302,40 @@ type EndpointInput struct { Insecure *bool `json:"insecure,omitempty"` } +// File +// 展示某个版本的所有文件。 +type F struct { + // 文件名称 + Datasource TypedObjectReference `json:"datasource"` + // 文件在数据源中的路径,a/b/c.txt或者d.txt + Path string `json:"path"` + // 摘要?摘啥 + Md5 *string `json:"md5,omitempty"` + // 文件成功导入时间,如果没有导入成功,这个字段为空 + Time *time.Time `json:"time,omitempty"` +} + +func (F) IsPageNode() {} + +// 根据条件顾虑版本内的文件,只支持关键词搜索 +type FileFilter struct { + // 根据关键词搜索文件,strings.Container(fileName, keyword) + Keyword string `json:"keyword"` + // 页 + Page int `json:"page"` + // 页内容数量 + PageSize int `json:"pageSize"` + // 根据文件名字或者更新时间排序, file, time + SortBy *string `json:"sortBy,omitempty"` +} + +type FileGroup struct { + // 数据源的基础信息 + Datasource TypedObjectReferenceInput `json:"datasource"` + // 用到的文件路径,注意⚠️ 一定不要加bucket的名字 + Paths []string `json:"paths,omitempty"` +} + type KnowledgeBase struct { Name string `json:"name"` Namespace string `json:"namespace"` @@ -216,6 +365,19 @@ type KnowledgeBaseQuery struct { ListKnowledgeBases PaginatedResult `json:"listKnowledgeBases"` } +type ListDatasetInput struct { + Name *string `json:"name,omitempty"` + Namespace string `json:"namespace"` + DisplayName *string `json:"displayName,omitempty"` + LabelSelector *string `json:"labelSelector,omitempty"` + FieldSelector *string `json:"fieldSelector,omitempty"` + // 分页页码,从1开始,默认是1 + Page *int `json:"page,omitempty"` + // 每页数量,默认10 + PageSize *int `json:"pageSize,omitempty"` + Keyword *string `json:"keyword,omitempty"` +} + // 分页查询输入 type ListDatasourceInput struct { // 数据源资源名称(不可同名) @@ -270,6 +432,19 @@ type ListModelInput struct { Keyword *string `json:"keyword,omitempty"` } +type ListVersionedDatasetInput struct { + Name *string `json:"name,omitempty"` + Namespace string `json:"namespace"` + DisplayName *string `json:"displayName,omitempty"` + LabelSelector *string `json:"labelSelector,omitempty"` + FieldSelector *string `json:"fieldSelector,omitempty"` + // 分页页码,从1开始,默认是1 + Page *int `json:"page,omitempty"` + // 每页数量,默认10 + PageSize *int `json:"pageSize,omitempty"` + Keyword *string `json:"keyword,omitempty"` +} + type Model struct { Name string `json:"name"` Namespace string `json:"namespace"` @@ -329,6 +504,21 @@ type TypedObjectReferenceInput struct { Namespace *string `json:"Namespace,omitempty"` } +type UpdateDatasetInput struct { + // name, namespace用来确定资源,不允许修改的。将原数据传递回来即可。 + Name string `json:"name"` + Namespace string `json:"namespace"` + // 更新的的标签信息,这里涉及到增加或者删除标签, + // 所以,如果标签有任何改动,传递完整的label。 + // 例如之前的标齐是: abc:def 新增一个标签aa:bb, 那么传递 abc:def, aa:bb + Labels map[string]interface{} `json:"labels,omitempty"` + Annotations map[string]interface{} `json:"annotations,omitempty"` + // 如果不更新,为空就可以 + DisplayName *string `json:"displayName,omitempty"` + // 同理 + Description *string `json:"description,omitempty"` +} + type UpdateDatasourceInput struct { // 数据源资源名称(不可同名) Name string `json:"name"` @@ -389,6 +579,68 @@ type UpdateModelInput struct { Description *string `json:"description,omitempty"` } +type UpdateVersionedDatasetInput struct { + // 这个名字就是metadat.name, 根据name和namespace确定资源 + // name,namespac是不可以更新的。 + Name string `json:"name"` + Namespace string `json:"namespace"` + // 更新的的标签信息,这里涉及到增加或者删除标签, + // 所以,如果标签有任何改动,传递完整的label。 + // 例如之前的标齐是: abc:def 新增一个标签aa:bb, 那么传递 abc:def, aa:bb + Labels map[string]interface{} `json:"labels,omitempty"` + // 传递方式同label + Annotations map[string]interface{} `json:"annotations,omitempty"` + DisplayName string `json:"displayName"` + Description *string `json:"description,omitempty"` + // 更新,删除数据集版本中的文件,传递方式于label相同,完全传递。 + // 如果传递一个空的数组过去,认为是删除全部文件。 + FileGroups []*FileGroup `json:"fileGroups,omitempty"` +} + +// VersionedDataset +// 数据集的版本信息。 +// 主要记录版本名字,数据的来源,以及文件的同步状态 +type VersionedDataset struct { + // 数据集名称, 这个应该是前端随机生成就可以,没有实际用途 + Name string `json:"name"` + // 数据集所在的namespace,也是后续桶的名字 + Namespace string `json:"namespace"` + // 一些用于标记,选择的的标签 + Labels map[string]interface{} `json:"labels,omitempty"` + // 添加一些辅助性记录信息 + Annotations map[string]interface{} `json:"annotations,omitempty"` + // 创建者,正查给你这个字段是不需要人写的,自动添加 + Creator *string `json:"creator,omitempty"` + // 展示名字, 与metadat.name不一样,这个展示名字是可以用中文的 + DisplayName string `json:"displayName"` + // 所属的数据集 + Dataset TypedObjectReference `json:"dataset"` + // 更新时间, 这里更新指文件同步,或者数据处理完成后,做的更新操作的时间 + UpdateTimestamp *time.Time `json:"updateTimestamp,omitempty"` + CreationTimestamp time.Time `json:"creationTimestamp"` + // 数据集所包含的文件,对于文件需要支持过滤和分页 + Files PaginatedResult `json:"files"` + // 版本名称 + Version string `json:"version"` + // 该数据集版本所包含的数据总量 + FileCount int `json:"fileCount"` + // 该版本是否已经发布, 0是未发布,1是已经发布 + Released int `json:"released"` +} + +func (VersionedDataset) IsPageNode() {} + +type VersionedDatasetMutation struct { + CreateVersionedDataset VersionedDataset `json:"createVersionedDataset"` + UpdateVersionedDataset VersionedDataset `json:"updateVersionedDataset"` + DeleteVersionedDatasets *string `json:"deleteVersionedDatasets,omitempty"` +} + +type VersionedDatasetQuery struct { + GetVersionedDataset VersionedDataset `json:"getVersionedDataset"` + ListVersionedDatasets PaginatedResult `json:"listVersionedDatasets"` +} + type Filegroup struct { Source *TypedObjectReference `json:"source,omitempty"` Path []string `json:"path,omitempty"` diff --git a/graphql-server/go-server/graph/impl/dataset.resolvers.go b/graphql-server/go-server/graph/impl/dataset.resolvers.go new file mode 100644 index 000000000..b06585ae3 --- /dev/null +++ b/graphql-server/go-server/graph/impl/dataset.resolvers.go @@ -0,0 +1,106 @@ +package impl + +// This file will be automatically regenerated based on the schema, any resolver implementations +// will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.40 + +import ( + "context" + + "github.com/kubeagi/arcadia/graphql-server/go-server/graph/generated" + "github.com/kubeagi/arcadia/graphql-server/go-server/pkg/auth" + "github.com/kubeagi/arcadia/graphql-server/go-server/pkg/client" + "github.com/kubeagi/arcadia/graphql-server/go-server/pkg/dataset" +) + +// Versions is the resolver for the versions field. +func (r *datasetResolver) Versions(ctx context.Context, obj *generated.Dataset, input generated.ListVersionedDatasetInput) (*generated.PaginatedResult, error) { + /* + idtoken := auth.ForOIDCToken(ctx) + c, err := client.GetClient(idtoken) + if err != nil { + return nil, err + } + input.Name = nil + input.Namespace = obj.Namespace + labelSelector := fmt.Sprintf("%s=%s", v1alpha1.LabelVersionedDatasetVersionOwner, obj.Name) + input.LabelSelector = &labelSelector + */ + return nil, nil + //return versioneddataset.ListVersionedDatasets(ctx, c, &input) +} + +// CreateDataset is the resolver for the createDataset field. +func (r *datasetMutationResolver) CreateDataset(ctx context.Context, obj *generated.DatasetMutation, input *generated.CreateDatasetInput) (*generated.Dataset, error) { + token := auth.ForOIDCToken(ctx) + c, err := client.GetClient(token) + if err != nil { + return nil, err + } + return dataset.CreateDataset(ctx, c, input) +} + +// UpdateDataset is the resolver for the updateDataset field. +func (r *datasetMutationResolver) UpdateDataset(ctx context.Context, obj *generated.DatasetMutation, input *generated.UpdateDatasetInput) (*generated.Dataset, error) { + token := auth.ForOIDCToken(ctx) + c, err := client.GetClient(token) + if err != nil { + return nil, err + } + return dataset.UpdateDataset(ctx, c, input) +} + +// DeleteDatasets is the resolver for the deleteDatasets field. +func (r *datasetMutationResolver) DeleteDatasets(ctx context.Context, obj *generated.DatasetMutation, input *generated.DeleteDatasetInput) (*string, error) { + idtoken := auth.ForOIDCToken(ctx) + c, err := client.GetClient(idtoken) + if err != nil { + return nil, err + } + return dataset.DeleteDatasets(ctx, c, input) +} + +// GetDataset is the resolver for the getDataset field. +func (r *datasetQueryResolver) GetDataset(ctx context.Context, obj *generated.DatasetQuery, name string, namespace string) (*generated.Dataset, error) { + idtoken := auth.ForOIDCToken(ctx) + c, err := client.GetClient(idtoken) + if err != nil { + return nil, err + } + return dataset.GetDataset(ctx, c, name, namespace) +} + +// ListDatasets is the resolver for the listDatasets field. +func (r *datasetQueryResolver) ListDatasets(ctx context.Context, obj *generated.DatasetQuery, input *generated.ListDatasetInput) (*generated.PaginatedResult, error) { + idtoken := auth.ForOIDCToken(ctx) + c, err := client.GetClient(idtoken) + if err != nil { + return nil, err + } + return dataset.ListDatasets(ctx, c, input) +} + +// Dataset is the resolver for the Dataset field. +func (r *mutationResolver) Dataset(ctx context.Context) (*generated.DatasetMutation, error) { + return &generated.DatasetMutation{}, nil +} + +// Dataset is the resolver for the Dataset field. +func (r *queryResolver) Dataset(ctx context.Context) (*generated.DatasetQuery, error) { + return &generated.DatasetQuery{}, nil +} + +// Dataset returns generated.DatasetResolver implementation. +func (r *Resolver) Dataset() generated.DatasetResolver { return &datasetResolver{r} } + +// DatasetMutation returns generated.DatasetMutationResolver implementation. +func (r *Resolver) DatasetMutation() generated.DatasetMutationResolver { + return &datasetMutationResolver{r} +} + +// DatasetQuery returns generated.DatasetQueryResolver implementation. +func (r *Resolver) DatasetQuery() generated.DatasetQueryResolver { return &datasetQueryResolver{r} } + +type datasetResolver struct{ *Resolver } +type datasetMutationResolver struct{ *Resolver } +type datasetQueryResolver struct{ *Resolver } diff --git a/graphql-server/go-server/graph/impl/versioned_dataset.resolvers.go b/graphql-server/go-server/graph/impl/versioned_dataset.resolvers.go new file mode 100644 index 000000000..49be10152 --- /dev/null +++ b/graphql-server/go-server/graph/impl/versioned_dataset.resolvers.go @@ -0,0 +1,81 @@ +package impl + +// This file will be automatically regenerated based on the schema, any resolver implementations +// will be copied through when generating and any unknown code will be moved to the end. +// Code generated by github.com/99designs/gqlgen version v0.17.40 + +import ( + "context" + "fmt" + + "github.com/kubeagi/arcadia/graphql-server/go-server/graph/generated" +) + +// VersionedDataset is the resolver for the VersionedDataset field. +func (r *mutationResolver) VersionedDataset(ctx context.Context) (*generated.VersionedDatasetMutation, error) { + panic(fmt.Errorf("not implemented: VersionedDataset - VersionedDataset")) +} + +// VersionedDataset is the resolver for the VersionedDataset field. +func (r *queryResolver) VersionedDataset(ctx context.Context) (*generated.VersionedDatasetQuery, error) { + panic(fmt.Errorf("not implemented: VersionedDataset - VersionedDataset")) +} + +// Files is the resolver for the files field. +func (r *versionedDatasetResolver) Files(ctx context.Context, obj *generated.VersionedDataset, input *generated.FileFilter) (*generated.PaginatedResult, error) { + panic(fmt.Errorf("not implemented: Files - files")) +} + +// CreateVersionedDataset is the resolver for the createVersionedDataset field. +func (r *versionedDatasetMutationResolver) CreateVersionedDataset(ctx context.Context, obj *generated.VersionedDatasetMutation, input generated.CreateVersionedDatasetInput) (*generated.VersionedDataset, error) { + panic(fmt.Errorf("not implemented: CreateVersionedDataset - createVersionedDataset")) +} + +// UpdateVersionedDataset is the resolver for the updateVersionedDataset field. +func (r *versionedDatasetMutationResolver) UpdateVersionedDataset(ctx context.Context, obj *generated.VersionedDatasetMutation, input generated.UpdateVersionedDatasetInput) (*generated.VersionedDataset, error) { + panic(fmt.Errorf("not implemented: UpdateVersionedDataset - updateVersionedDataset")) +} + +// DeleteVersionedDatasets is the resolver for the deleteVersionedDatasets field. +func (r *versionedDatasetMutationResolver) DeleteVersionedDatasets(ctx context.Context, obj *generated.VersionedDatasetMutation, input generated.DeleteVersionedDatasetInput) (*string, error) { + panic(fmt.Errorf("not implemented: DeleteVersionedDatasets - deleteVersionedDatasets")) +} + +// GetVersionedDataset is the resolver for the getVersionedDataset field. +func (r *versionedDatasetQueryResolver) GetVersionedDataset(ctx context.Context, obj *generated.VersionedDatasetQuery, name string, namespace string) (*generated.VersionedDataset, error) { + panic(fmt.Errorf("not implemented: GetVersionedDataset - getVersionedDataset")) +} + +// ListVersionedDatasets is the resolver for the listVersionedDatasets field. +func (r *versionedDatasetQueryResolver) ListVersionedDatasets(ctx context.Context, obj *generated.VersionedDatasetQuery, input generated.ListVersionedDatasetInput) (*generated.PaginatedResult, error) { + panic(fmt.Errorf("not implemented: ListVersionedDatasets - listVersionedDatasets")) +} + +// VersionedDataset returns generated.VersionedDatasetResolver implementation. +func (r *Resolver) VersionedDataset() generated.VersionedDatasetResolver { + return &versionedDatasetResolver{r} +} + +// VersionedDatasetMutation returns generated.VersionedDatasetMutationResolver implementation. +func (r *Resolver) VersionedDatasetMutation() generated.VersionedDatasetMutationResolver { + return &versionedDatasetMutationResolver{r} +} + +// VersionedDatasetQuery returns generated.VersionedDatasetQueryResolver implementation. +func (r *Resolver) VersionedDatasetQuery() generated.VersionedDatasetQueryResolver { + return &versionedDatasetQueryResolver{r} +} + +type versionedDatasetResolver struct{ *Resolver } +type versionedDatasetMutationResolver struct{ *Resolver } +type versionedDatasetQueryResolver struct{ *Resolver } + +// !!! WARNING !!! +// The code below was going to be deleted when updating resolvers. It has been copied here so you have +// one last chance to move it out of harms way if you want. There are two reasons this happens: +// - When renaming or deleting a resolver the old code will be put in here. You can safely delete +// it when you're done. +// - You have helper methods in this file. Move them out to keep these resolver files clean. +func (r *versionedDatasetResolver) FileGroups(ctx context.Context, obj *generated.VersionedDataset, input *generated.FileFilter) (*generated.PaginatedResult, error) { + panic(fmt.Errorf("not implemented: FileGroups - fileGroups")) +} diff --git a/graphql-server/go-server/graph/schema/dataset.graphqls b/graphql-server/go-server/graph/schema/dataset.graphqls new file mode 100644 index 000000000..832066d2b --- /dev/null +++ b/graphql-server/go-server/graph/schema/dataset.graphqls @@ -0,0 +1,155 @@ +""" +Dataset +数据集代表用户纳管的一组相似属性的文件,采用相同的方式进行数据处理并用于后续的 +1. 模型训练 +2. 知识库 + +支持多种类型数据: +- 文本 +- 图片 +- 视频 + +单个数据集仅允许包含同一类型文件,不同类型文件将被忽略 +数据集允许有多个版本,数据处理针对单个版本进行 +数据集某个版本完成数据处理后,数据处理服务需要将处理后的存储回 版本数据集 +""" +type Dataset { + """数据集名称""" + name: String! + + """数据集所在的namespace,也是后续桶的名字""" + namespace: String! + + """一些用于标记,选择的的标签""" + labels: Map + + """添加一些辅助性记录信息""" + annotations: Map + + """创建者,正查给你这个字段是不需要人写的,自动添加""" + creator: String + + """展示名字, 与metadat.name不一样,这个展示名字是可以用中文的""" + displayName: String! + + """更新时间, 这里更新指文件同步,或者数据处理完成后,做的更新操作的时间""" + updateTimestamp: Time + + """数据集类型,文本,图片,视频""" + contentType: String! + + """应用场景""" + field: String + + """ + 这个是一个resolver,数据集下面的版本列表。 + 支持对名字,类型的完全匹配过滤。 + 支持通过标签(somelabel=abc),字段(metadata.name=abc)进行过滤 + """ + versions(input: ListVersionedDatasetInput!): PaginatedResult! + + """数据集的总版本数量""" + versionCount: Int! +} + +input CreateDatasetInput { + """数据集的CR名字,要满足k8s的名称规则""" + name: String! + + namespace: String! + + """一些标签选择信息,可以不添加""" + labels: Map + + """一些备注用的注视信息,或者记录一个简单的配置""" + annotations: Map + + """展示名称,用于展示在界面上的,必须填写""" + displayName: String! + + """描述信息,可以不写""" + description: String + + """数据集里面的数据的类型,文本,视频,图片""" + contentType: String! + + """应用场景,可以为空""" + filed: String +} + +input UpdateDatasetInput { + """ + name, namespace用来确定资源,不允许修改的。将原数据传递回来即可。 + """ + name: String! + namespace: String! + + """ + 更新的的标签信息,这里涉及到增加或者删除标签, + 所以,如果标签有任何改动,传递完整的label。 + 例如之前的标齐是: abc:def 新增一个标签aa:bb, 那么传递 abc:def, aa:bb + """ + labels: Map + annotations: Map + + """如果不更新,为空就可以""" + displayName: String + + """同理""" + description: String +} + +input DeleteDatasetInput { + name: String + namespace: String! + labelSelector: String + fieldSelector: String +} + +input ListDatasetInput { + name: String + namespace: String! + displayName: String + labelSelector: String + fieldSelector: String + + """分页页码,从1开始,默认是1""" + page: Int + + """每页数量,默认10""" + pageSize: Int + keyword: String +} + +type DatasetQuery { + """根据名字获取某个具体的数据集""" + getDataset(name: String!, namespace: String!): Dataset! + + """ + 获取数据集列表,支持通过标签和字段进行选择。 + labelSelector: aa=bbb + fieldSelector= metadata.name=somename + """ + listDatasets(input: ListDatasetInput): PaginatedResult! +} + +type DatasetMutation { + createDataset(input: CreateDatasetInput): Dataset! + updateDataset(input: UpdateDatasetInput): Dataset! + + """ + 删除数据集 + 可以提供一个名称列表,会将所有名字在这个列表的dataset全部删除 + 支持通过标签进行删除,提供一个标签选择器,将满足标签的dataset全部删除 + 如果提供了这两个参数,以名字列表为主。 + """ + deleteDatasets(input: DeleteDatasetInput): Void +} + +extend type Query { + Dataset: DatasetQuery +} + +extend type Mutation { + Dataset: DatasetMutation +} \ No newline at end of file diff --git a/graphql-server/go-server/graph/schema/entrypoint.graphqls b/graphql-server/go-server/graph/schema/entrypoint.graphqls index f8e39661e..fc77f048a 100644 --- a/graphql-server/go-server/graph/schema/entrypoint.graphqls +++ b/graphql-server/go-server/graph/schema/entrypoint.graphqls @@ -31,4 +31,4 @@ type TypedObjectReference { Namespace: String } -union PageNode = Datasource | Model | Embedder | KnowledgeBase +union PageNode = Datasource | Model | Embedder | KnowledgeBase | Dataset | VersionedDataset | F diff --git a/graphql-server/go-server/graph/schema/versioned_dataset.graphqls b/graphql-server/go-server/graph/schema/versioned_dataset.graphqls new file mode 100644 index 000000000..df264f3dd --- /dev/null +++ b/graphql-server/go-server/graph/schema/versioned_dataset.graphqls @@ -0,0 +1,189 @@ +""" +VersionedDataset +数据集的版本信息。 +主要记录版本名字,数据的来源,以及文件的同步状态 +""" +type VersionedDataset { + """数据集名称, 这个应该是前端随机生成就可以,没有实际用途""" + name: String! + + """数据集所在的namespace,也是后续桶的名字""" + namespace: String! + + """一些用于标记,选择的的标签""" + labels: Map + + """添加一些辅助性记录信息""" + annotations: Map + + """创建者,正查给你这个字段是不需要人写的,自动添加""" + creator: String + + """展示名字, 与metadat.name不一样,这个展示名字是可以用中文的""" + displayName: String! + + """所属的数据集""" + dataset: TypedObjectReference! + + """更新时间, 这里更新指文件同步,或者数据处理完成后,做的更新操作的时间""" + updateTimestamp: Time + creationTimestamp: Time! + + """数据集所包含的文件,对于文件需要支持过滤和分页""" + files(input: FileFilter): PaginatedResult! + + + """版本名称""" + version: String! + + """该数据集版本所包含的数据总量""" + fileCount: Int! + + """该版本是否已经发布, 0是未发布,1是已经发布""" + released: Int! +} + +""" +File +展示某个版本的所有文件。 +""" +type F { + """文件名称""" + datasource: TypedObjectReference! + + "文件在数据源中的路径,a/b/c.txt或者d.txt" + path: String! + + """摘要?摘啥""" + md5: String + + """文件成功导入时间,如果没有导入成功,这个字段为空""" + time: Time +} + +""" +根据条件顾虑版本内的文件,只支持关键词搜索 +""" +input FileFilter { + """根据关键词搜索文件,strings.Container(fileName, keyword)""" + keyword: String! + + """页""" + page: Int! + + """页内容数量""" + pageSize: Int! + + """根据文件名字或者更新时间排序, file, time""" + sortBy: String +} + +input FileGroup { + """数据源的基础信息""" + datasource: TypedObjectReferenceInput! + + """用到的文件路径,注意⚠️ 一定不要加bucket的名字""" + paths: [String!] +} + + +input CreateVersionedDatasetInput { + """数据集的CR名字,要满足k8s的名称规则""" + name: String! + + namespace: String! + + """dataset的名字,需要根据这个名字, + 判断是否最新版本不包含任何文件(产品要求,有一个不包含任何文件的版本,不允许创建新的版本) + """ + datasetName: String! + + """一些标签选择信息,可以不添加""" + labels: Map + + """一些备注用的注视信息,或者记录一个简单的配置""" + annotations: Map + + """展示名称,用于展示在界面上的,必须填写""" + displayName: String! + + """描述信息,可以不写""" + description: String + + """数据集里面的数据的类型,文本,视频,图片""" + version: String! + + """是否发布,0是未发布,1是已经发布,创建一个版本的时候默认传递0就可以""" + release: Int! + + fileGrups: [FileGroup] +} + +input UpdateVersionedDatasetInput { + """ + 这个名字就是metadat.name, 根据name和namespace确定资源 + name,namespac是不可以更新的。 + """ + name: String! + namespace: String! + + """ + 更新的的标签信息,这里涉及到增加或者删除标签, + 所以,如果标签有任何改动,传递完整的label。 + 例如之前的标齐是: abc:def 新增一个标签aa:bb, 那么传递 abc:def, aa:bb + """ + labels: Map + + """传递方式同label""" + annotations: Map + + displayName: String! + description: String + + """ + 更新,删除数据集版本中的文件,传递方式于label相同,完全传递。 + 如果传递一个空的数组过去,认为是删除全部文件。 + """ + fileGroups: [FileGroup!] +} + + +input DeleteVersionedDatasetInput { + name: String + namespace: String! + labelSelector: String + fieldSelector: String +} + +input ListVersionedDatasetInput { + name: String + namespace: String! + displayName: String + labelSelector: String + fieldSelector: String + + """分页页码,从1开始,默认是1""" + page: Int + + """每页数量,默认10""" + pageSize: Int + keyword: String +} + +type VersionedDatasetQuery { + getVersionedDataset(name: String!, namespace: String!): VersionedDataset! + listVersionedDatasets(input: ListVersionedDatasetInput!): PaginatedResult! +} +type VersionedDatasetMutation { + createVersionedDataset(input: CreateVersionedDatasetInput!): VersionedDataset! + updateVersionedDataset(input: UpdateVersionedDatasetInput!): VersionedDataset! + deleteVersionedDatasets(input: DeleteVersionedDatasetInput!): Void +} + +extend type Query { + VersionedDataset: VersionedDatasetQuery +} + +extend type Mutation { + VersionedDataset: VersionedDatasetMutation +} diff --git a/graphql-server/go-server/pkg/dataset/dataset.go b/graphql-server/go-server/pkg/dataset/dataset.go new file mode 100644 index 000000000..7097688a2 --- /dev/null +++ b/graphql-server/go-server/pkg/dataset/dataset.go @@ -0,0 +1,224 @@ +package dataset + +import ( + "context" + "fmt" + "strings" + + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/dynamic" + + "github.com/kubeagi/arcadia/api/v1alpha1" + "github.com/kubeagi/arcadia/graphql-server/go-server/graph/generated" +) + +var datasetSchema = schema.GroupVersionResource{ + Group: v1alpha1.GroupVersion.Group, + Version: v1alpha1.GroupVersion.Version, + Resource: "datasets", +} + +func dataset2model(obj *unstructured.Unstructured) (*generated.Dataset, error) { + ds := &generated.Dataset{} + ds.Name = obj.GetName() + ds.Namespace = obj.GetNamespace() + if r := obj.GetLabels(); len(r) > 0 { + l := make(map[string]any) + for k, v := range r { + l[k] = v + } + ds.Labels = l + } + if r := obj.GetAnnotations(); len(r) > 0 { + a := make(map[string]any) + for k, v := range r { + a[k] = v + } + ds.Annotations = a + } + dataset := &v1alpha1.Dataset{} + if err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, dataset); err != nil { + return nil, err + } + ds.Creator = &dataset.Spec.Creator + ds.DisplayName = dataset.Spec.DisplayName + ds.ContentType = dataset.Spec.ContentType + ds.Field = &dataset.Spec.Field + return ds, nil +} + +func CreateDataset(ctx context.Context, c dynamic.Interface, input *generated.CreateDatasetInput) (*generated.Dataset, error) { + dataset := &v1alpha1.Dataset{ + ObjectMeta: v1.ObjectMeta{ + Name: input.Name, + Namespace: input.Namespace, + }, + TypeMeta: v1.TypeMeta{ + Kind: "Dataset", + APIVersion: v1alpha1.GroupVersion.String(), + }, + Spec: v1alpha1.DatasetSpec{ + ContentType: input.ContentType, + CommonSpec: v1alpha1.CommonSpec{ + DisplayName: input.DisplayName, + }, + }, + } + if input.Description != nil { + dataset.Spec.Description = *input.Description + } + if len(input.Labels) > 0 { + l := make(map[string]string) + for k, v := range input.Labels { + l[k] = v.(string) + } + dataset.Labels = l + } + if len(input.Annotations) > 0 { + a := make(map[string]string) + for k, v := range input.Annotations { + a[k] = v.(string) + } + dataset.Annotations = a + } + + u, err := runtime.DefaultUnstructuredConverter.ToUnstructured(dataset) + if err != nil { + return nil, err + } + obj, err := c.Resource(datasetSchema).Namespace(input.Namespace).Create(ctx, &unstructured.Unstructured{Object: u}, v1.CreateOptions{}) + if err != nil { + return nil, err + } + return dataset2model(obj) +} + +func ListDatasets(ctx context.Context, c dynamic.Interface, input *generated.ListDatasetInput) (*generated.PaginatedResult, error) { + listOptions := v1.ListOptions{} + if input.Name != nil { + listOptions.FieldSelector = fmt.Sprintf("metadata.name=%s", *input.Name) + } else { + if input.LabelSelector != nil { + listOptions.LabelSelector = *input.LabelSelector + } + if input.FieldSelector != nil { + listOptions.FieldSelector = *input.FieldSelector + } + } + datastList, err := c.Resource(datasetSchema).Namespace(input.Namespace).List(ctx, listOptions) + if err != nil { + return nil, err + } + page, size := 1, 10 + if input.Page != nil && *input.Page > 0 { + page = *input.Page + } + if input.PageSize != nil && *input.PageSize > 0 { + size = *input.PageSize + } + result := make([]generated.PageNode, 0) + for _, u := range datastList.Items { + uu, _ := dataset2model(&u) + if input.DisplayName != nil && uu.DisplayName != *input.DisplayName { + continue + } + if input.Keyword != nil { + ok := false + if strings.Contains(uu.Name, *input.Keyword) { + ok = true + } + if strings.Contains(uu.Namespace, *input.Keyword) { + ok = true + } + if strings.Contains(uu.DisplayName, *input.Keyword) { + ok = true + } + if strings.Contains(uu.ContentType, *input.Keyword) { + ok = true + } + for _, v := range uu.Annotations { + if strings.Contains(v.(string), *input.Keyword) { + ok = true + break + } + } + if !ok { + continue + } + } + result = append(result, uu) + } + total := len(result) + end := page * size + if end > total { + end = total + } + return &generated.PaginatedResult{ + TotalCount: total, + HasNextPage: end < total, + Nodes: result[(page-1)*size : end], + Page: &page, + PageSize: &size, + }, nil +} + +func UpdateDataset(ctx context.Context, c dynamic.Interface, input *generated.UpdateDatasetInput) (*generated.Dataset, error) { + obj, err := c.Resource(datasetSchema).Namespace(input.Namespace).Get(ctx, input.Name, v1.GetOptions{}) + if err != nil { + return nil, err + } + l := make(map[string]string) + for k, v := range input.Labels { + l[k] = v.(string) + } + a := make(map[string]string) + for k, v := range input.Annotations { + a[k] = v.(string) + } + obj.SetLabels(l) + obj.SetAnnotations(a) + displayname, _, _ := unstructured.NestedString(obj.Object, "spec", "displayName") + description, _, _ := unstructured.NestedString(obj.Object, "spec", "description") + if input.DisplayName != nil && *input.DisplayName != displayname { + _ = unstructured.SetNestedField(obj.Object, input.DisplayName, "spec", "displayName") + } + if input.Description != nil && *input.Description != description { + _ = unstructured.SetNestedField(obj.Object, *input.Description, "spec", "description") + } + obj, err = c.Resource(datasetSchema).Namespace(input.Namespace).Update(ctx, obj, v1.UpdateOptions{}) + if err != nil { + return nil, err + } + return dataset2model(obj) +} + +func DeleteDatasets(ctx context.Context, c dynamic.Interface, input *generated.DeleteDatasetInput) (*string, error) { + none := "" + listOptions := v1.ListOptions{} + if input.Name == nil && input.LabelSelector == nil && input.FieldSelector == nil { + return &none, fmt.Errorf("no name, no labelselector, no fieldsleector, i don't know which one to delete") + } + if input.Name != nil { + listOptions.FieldSelector = fmt.Sprintf("metadata.name=%s", *input.Name) + } else { + if input.LabelSelector != nil { + listOptions.LabelSelector = *input.LabelSelector + } + if input.FieldSelector != nil { + listOptions.FieldSelector = *input.FieldSelector + } + } + err := c.Resource(datasetSchema).Namespace(input.Namespace).DeleteCollection(ctx, v1.DeleteOptions{}, listOptions) + return &none, err +} + +func GetDataset(ctx context.Context, c dynamic.Interface, name, namespace string) (*generated.Dataset, error) { + obj, err := c.Resource(datasetSchema).Namespace(namespace).Get(ctx, name, v1.GetOptions{}) + if err != nil { + return nil, err + } + return dataset2model(obj) +}