Skip to content

Commit 1696e08

Browse files
authored
entgql: use dynamic Value/GetValue method name in pagination with edge order fields (#603)
Updates to use the `ValueName` method to get the name of the dynamic `Value`/`GetValue` method name for a type instead of using the hard-coded name `Value` in the `pagination.tmpl` file.
1 parent 316dcd5 commit 1696e08

61 files changed

Lines changed: 1849 additions & 73 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

entgql/internal/todo/ent.graphql

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ input CreateTodoInput {
318318
priority: Int
319319
text: String!
320320
init: Map
321+
value: Int
321322
parentID: ID
322323
childIDs: [ID!]
323324
categoryID: ID
@@ -974,6 +975,7 @@ type Todo implements Node {
974975
init: Map
975976
custom: [Custom!]
976977
customp: [Custom]
978+
value: Int!
977979
parent: Todo
978980
children(
979981
"""
@@ -1145,6 +1147,17 @@ input TodoWhereInput {
11451147
categoryIDIsNil: Boolean
11461148
categoryIDNotNil: Boolean
11471149
"""
1150+
value field predicates
1151+
"""
1152+
value: Int
1153+
valueNEQ: Int
1154+
valueIn: [Int!]
1155+
valueNotIn: [Int!]
1156+
valueGT: Int
1157+
valueGTE: Int
1158+
valueLT: Int
1159+
valueLTE: Int
1160+
"""
11481161
parent edge predicates
11491162
"""
11501163
hasParent: Boolean
@@ -1208,6 +1221,7 @@ input UpdateTodoInput {
12081221
text: String
12091222
init: Map
12101223
clearInit: Boolean
1224+
value: Int
12111225
parentID: ID
12121226
clearParent: Boolean
12131227
addChildIDs: [ID!]

entgql/internal/todo/ent/gql_collection.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

entgql/internal/todo/ent/gql_mutation_input.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

entgql/internal/todo/ent/gql_node_descriptor.go

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

entgql/internal/todo/ent/gql_pagination.go

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

entgql/internal/todo/ent/gql_where_input.go

Lines changed: 34 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

entgql/internal/todo/ent/migrate/schema.go

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)