Reformat and Refactor packages. Rebuild GraphQL.

This commit is contained in:
Jan Eitzinger
2022-09-07 12:24:45 +02:00
parent b7907d33aa
commit 8856f26fb0
30 changed files with 5728 additions and 3200 deletions

View File

@@ -7,11 +7,6 @@ exec:
filename: internal/graph/generated/generated.go
package: generated
# Uncomment to enable federation
# federation:
# filename: graph/generated/federation.go
# package: generated
# Where should any generated models go?
model:
filename: internal/graph/model/models_gen.go
@@ -20,7 +15,7 @@ model:
# Where should the resolver implementations go?
resolver:
layout: follow-schema
dir: graph
dir: internal/graph
package: graph
# Optional: turn on use `gqlgen:"fieldName"` tags in your models
@@ -35,7 +30,7 @@ resolver:
# gqlgen will search for any type names in the schema in these go packages
# if they match it will use them, otherwise it will generate them.
autobind:
- "github.com/ClusterCockpit/cc-backend/graph/model"
- "github.com/ClusterCockpit/cc-backend/pkg/schema"
# This section declares type mapping between the GraphQL and go type systems
#
@@ -55,7 +50,7 @@ models:
- github.com/99designs/gqlgen/graphql.Int64
- github.com/99designs/gqlgen/graphql.Int32
Job:
model: "github.com/ClusterCockpit/cc-backend/schema.Job"
model: "github.com/ClusterCockpit/cc-backend/pkg/schema.Job"
fields:
tags:
resolver: true
@@ -65,13 +60,13 @@ models:
fields:
partitions:
resolver: true
NullableFloat: { model: "github.com/ClusterCockpit/cc-backend/schema.Float" }
MetricScope: { model: "github.com/ClusterCockpit/cc-backend/schema.MetricScope" }
JobStatistics: { model: "github.com/ClusterCockpit/cc-backend/schema.JobStatistics" }
Tag: { model: "github.com/ClusterCockpit/cc-backend/schema.Tag" }
Resource: { model: "github.com/ClusterCockpit/cc-backend/schema.Resource" }
JobState: { model: "github.com/ClusterCockpit/cc-backend/schema.JobState" }
JobMetric: { model: "github.com/ClusterCockpit/cc-backend/schema.JobMetric" }
Series: { model: "github.com/ClusterCockpit/cc-backend/schema.Series" }
MetricStatistics: { model: "github.com/ClusterCockpit/cc-backend/schema.MetricStatistics" }
StatsSeries: { model: "github.com/ClusterCockpit/cc-backend/schema.StatsSeries" }
NullableFloat: { model: "github.com/ClusterCockpit/cc-backend/pkg/schema.Float" }
MetricScope: { model: "github.com/ClusterCockpit/cc-backend/pkg/schema.MetricScope" }
JobStatistics: { model: "github.com/ClusterCockpit/cc-backend/pkg/schema.JobStatistics" }
Tag: { model: "github.com/ClusterCockpit/cc-backend/pkg/schema.Tag" }
Resource: { model: "github.com/ClusterCockpit/cc-backend/pkg/schema.Resource" }
JobState: { model: "github.com/ClusterCockpit/cc-backend/pkg/schema.JobState" }
JobMetric: { model: "github.com/ClusterCockpit/cc-backend/pkg/schema.JobMetric" }
Series: { model: "github.com/ClusterCockpit/cc-backend/pkg/schema.Series" }
MetricStatistics: { model: "github.com/ClusterCockpit/cc-backend/pkg/schema.MetricStatistics" }
StatsSeries: { model: "github.com/ClusterCockpit/cc-backend/pkg/schema.StatsSeries" }