Skip to content

Commit

Permalink
Rename collectionId to collectionID
Browse files Browse the repository at this point in the history
  • Loading branch information
islamaliev committed Mar 28, 2023
1 parent 17eb39c commit 96f6daf
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion client/request/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const (
HeightFieldName = "height"
CidFieldName = "cid"
DockeyFieldName = "dockey"
CollectionIDFieldName = "collectionId"
CollectionIDFieldName = "collectionID"
SchemaVersionIDFieldName = "schemaVersionId"
DeltaFieldName = "delta"

Expand Down
6 changes: 3 additions & 3 deletions request/graphql/schema/types/commits.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var (
"dockey": &gql.Field{
Type: gql.String,
},
"collectionId": &gql.Field{
"collectionID": &gql.Field{
Type: gql.Int,
},
"schemaVersionId": &gql.Field{
Expand Down Expand Up @@ -114,7 +114,7 @@ var (
"dockey": &gql.InputObjectFieldConfig{
Type: OrderingEnum,
},
"collectionId": &gql.InputObjectFieldConfig{
"collectionID": &gql.InputObjectFieldConfig{
Type: OrderingEnum,
},
},
Expand All @@ -128,7 +128,7 @@ var (
"height": &gql.EnumValueConfig{Value: "height"},
"cid": &gql.EnumValueConfig{Value: "cid"},
"dockey": &gql.EnumValueConfig{Value: "dockey"},
"collectionId": &gql.EnumValueConfig{Value: "collectionId"},
"collectionID": &gql.EnumValueConfig{Value: "collectionID"},
},
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

func TestQueryCommitsWithCollectionIDGroupedAndOrderedDesc(t *testing.T) {
test := testUtils.TestCase{
Description: "Simple commits query with collectionId property grouped and ordered desc",
Description: "Simple commits query with collectionID property grouped and ordered desc",
Actions: []any{
updateUserCollectionSchema(),
updateCompaniesCollectionSchema(),
Expand All @@ -37,16 +37,16 @@ func TestQueryCommitsWithCollectionIDGroupedAndOrderedDesc(t *testing.T) {
},
testUtils.Request{
Request: ` {
commits(groupBy: [collectionId], order: {collectionId: DESC}) {
collectionId
commits(groupBy: [collectionID], order: {collectionID: DESC}) {
collectionID
}
}`,
Results: []map[string]any{
{
"collectionId": int64(2),
"collectionID": int64(2),
},
{
"collectionId": int64(1),
"collectionID": int64(1),
},
},
},
Expand All @@ -58,7 +58,7 @@ func TestQueryCommitsWithCollectionIDGroupedAndOrderedDesc(t *testing.T) {

func TestQueryCommitsWithCollectionIDGroupedAndOrderedAs(t *testing.T) {
test := testUtils.TestCase{
Description: "Simple commits query with collectionId property grouped and ordered asc",
Description: "Simple commits query with collectionID property grouped and ordered asc",
Actions: []any{
updateUserCollectionSchema(),
updateCompaniesCollectionSchema(),
Expand All @@ -77,16 +77,16 @@ func TestQueryCommitsWithCollectionIDGroupedAndOrderedAs(t *testing.T) {
},
testUtils.Request{
Request: ` {
commits(groupBy: [collectionId], order: {collectionId: ASC}) {
collectionId
commits(groupBy: [collectionID], order: {collectionID: ASC}) {
collectionID
}
}`,
Results: []map[string]any{
{
"collectionId": int64(1),
"collectionID": int64(1),
},
{
"collectionId": int64(2),
"collectionID": int64(2),
},
},
},
Expand Down
14 changes: 7 additions & 7 deletions tests/integration/query/commits/with_collectionid_prop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

func TestQueryCommitsWithCollectionID(t *testing.T) {
test := testUtils.TestCase{
Description: "Simple commits query with collectionId property",
Description: "Simple commits query with collectionID property",
Actions: []any{
updateUserCollectionSchema(),
updateCompaniesCollectionSchema(),
Expand All @@ -38,24 +38,24 @@ func TestQueryCommitsWithCollectionID(t *testing.T) {
testUtils.Request{
Request: `query {
commits {
collectionId
collectionID
}
}`,
Results: []map[string]any{
{
"collectionId": int64(1),
"collectionID": int64(1),
},
{
"collectionId": int64(1),
"collectionID": int64(1),
},
{
"collectionId": int64(1),
"collectionID": int64(1),
},
{
"collectionId": int64(2),
"collectionID": int64(2),
},
{
"collectionId": int64(2),
"collectionID": int64(2),
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

func TestQueryLastCommitsWithCollectionIdProperty(t *testing.T) {
test := testUtils.TestCase{
Description: "Simple latest commits query with collectionId property",
Description: "Simple latest commits query with collectionID property",
Actions: []any{
updateUserCollectionSchema(),
updateCompaniesCollectionSchema(),
Expand All @@ -38,24 +38,24 @@ func TestQueryLastCommitsWithCollectionIdProperty(t *testing.T) {
testUtils.Request{
Request: `query {
latestCommits(dockey: "bae-52b9170d-b77a-5887-b877-cbdbb99b009f") {
collectionId
collectionID
}
}`,
Results: []map[string]any{
{
"collectionId": int64(1),
"collectionID": int64(1),
},
},
},
testUtils.Request{
Request: `query {
latestCommits(dockey: "bae-eed4b800-6704-5bcd-8250-5d2743820a7b") {
collectionId
collectionID
}
}`,
Results: []map[string]any{
{
"collectionId": int64(2),
"collectionID": int64(2),
},
},
},
Expand Down

0 comments on commit 96f6daf

Please sign in to comment.