-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Rename commit field input arg to fieldId #1460
fix: Rename commit field input arg to fieldId #1460
Conversation
@@ -20,6 +20,7 @@ const ( | |||
DocKey = "dockey" | |||
DocKeys = "dockeys" | |||
FieldName = "field" | |||
FieldIDName = "fieldId" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: new property required, as some references to FieldName
were actually for field
in stuff like aggregates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was already FieldIDFieldName
bellow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FieldIDFieldName
is the field name, not the input arg name.
Codecov Report
@@ Coverage Diff @@
## develop #1460 +/- ##
========================================
Coverage 72.22% 72.22%
========================================
Files 185 185
Lines 18224 18224
========================================
Hits 13162 13162
Misses 4026 4026
Partials 1036 1036
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few thoughts I'd like to discuss before approving.
client/request/commit.go
Outdated
Cid immutable.Option[string] | ||
Depth immutable.Option[uint64] | ||
DocKey immutable.Option[string] | ||
FieldIDName immutable.Option[string] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: I'm not sure FieldIDName
makes sense here. FiedID
seemed more appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers, I think you are right and this is probably either a find and replace or auto-pilot induced mistake :) Will sort these out.
- rename mapper.Commit prop
planner/mapper/commitSelect.go
Outdated
@@ -23,7 +23,7 @@ type CommitSelect struct { | |||
DocKey immutable.Option[string] | |||
|
|||
// The field for which commits have been requested. | |||
FieldName immutable.Option[string] | |||
FieldIDName immutable.Option[string] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: Same as above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers, I think you are right and this is probably either a find and replace or auto-pilot induced mistake :) Will sort these out.
- rename commitSelect prop
@@ -20,6 +20,7 @@ const ( | |||
DocKey = "dockey" | |||
DocKeys = "dockeys" | |||
FieldName = "field" | |||
FieldIDName = "fieldId" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was already FieldIDFieldName
bellow.
@@ -37,9 +37,9 @@ func parseCommitSelect(schema gql.Schema, parent *gql.Object, field *ast.Field) | |||
} else if prop == request.Cid { | |||
raw := argument.Value.(*ast.StringValue) | |||
commit.Cid = immutable.Some(raw.Value) | |||
} else if prop == request.FieldName { | |||
} else if prop == request.FieldIDName { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought(out-of-scope): I'm noticing that the prop
is being compared to field names and we have the proper constants to make it a more visually descriptive conditional.
LinksFieldName = "links"
HeightFieldName = "height"
CidFieldName = "cid"
DockeyFieldName = "dockey"
CollectionIDFieldName = "collectionID"
SchemaVersionIDFieldName = "schemaVersionId"
FieldNameFieldName = "fieldName"
FieldIDFieldName = "fieldId"
DeltaFieldName = "delta"
7fe2786
to
47ae50e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change Andy!
47ae50e
to
dcab186
Compare
## Relevant issue(s) Resolves sourcenetwork#1452 ## Description Renames commit `field` input arg to `fieldId`, to match the field `fieldId`. Includes the explain output.
Relevant issue(s)
Resolves #1452
Description
Renames commit
field
input arg tofieldId
, to match the fieldfieldId
. Includes the explain output.