Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
refactor: add PropertySchemaGroupID to pkg/id (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 authored Nov 5, 2021
1 parent 25c5810 commit 9ece9e8
Show file tree
Hide file tree
Showing 58 changed files with 494 additions and 419 deletions.
2 changes: 2 additions & 0 deletions gqlgen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ models:
model: github.com/reearth/reearth-backend/internal/adapter/gql/gqlmodel.PluginExtensionID
PropertySchemaID:
model: github.com/reearth/reearth-backend/internal/adapter/gql/gqlmodel.PropertySchemaID
PropertySchemaGroupID:
model: github.com/reearth/reearth-backend/internal/adapter/gql/gqlmodel.PropertySchemaGroupID
PropertySchemaFieldID:
model: github.com/reearth/reearth-backend/internal/adapter/gql/gqlmodel.PropertySchemaFieldID
DatasetSchemaFieldID:
Expand Down
127 changes: 79 additions & 48 deletions internal/adapter/gql/generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/adapter/gql/gqlmodel/convert_property.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ func ToPropertyConditon(c *property.Condition) *PropertyCondition {
}
}

func FromPointer(schemaItem *id.PropertySchemaFieldID, item *id.ID, field *id.PropertySchemaFieldID) *property.Pointer {
func FromPointer(schemaItem *id.PropertySchemaGroupID, item *id.ID, field *id.PropertySchemaFieldID) *property.Pointer {
i := id.PropertyItemIDFromRefID(item)
return property.NewPointer(schemaItem, i, field)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/adapter/gql/gqlmodel/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func (d *PropertyGroup) Field(id id.PropertySchemaFieldID) *PropertyField {
return nil
}

func (d *PropertySchema) Group(id id.PropertySchemaFieldID) *PropertySchemaGroup {
func (d *PropertySchema) Group(id id.PropertySchemaGroupID) *PropertySchemaGroup {
if d == nil || id == "" {
return nil
}
Expand Down
Loading

0 comments on commit 9ece9e8

Please sign in to comment.