mirror of
https://github.com/ent/ent.git
synced 2026-05-28 09:49:08 +03:00
website/blog: update where input to camel (#1696)
This commit is contained in:
@@ -37,14 +37,14 @@ query FilterTodos {
|
|||||||
where: {
|
where: {
|
||||||
or: [
|
or: [
|
||||||
{
|
{
|
||||||
has_parent: false,
|
hasParent: false,
|
||||||
status: COMPLETED,
|
status: COMPLETED,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: IN_PROGRESS,
|
status: IN_PROGRESS,
|
||||||
has_parent_with: {
|
hasParentWith: {
|
||||||
priority_lt: 1,
|
priorityLT: 1,
|
||||||
status_neq: COMPLETED,
|
statusNEQ: COMPLETED,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -174,20 +174,20 @@ type TodoWhereInput struct {
|
|||||||
And []*TodoWhereInput `json:"and,omitempty"`
|
And []*TodoWhereInput `json:"and,omitempty"`
|
||||||
|
|
||||||
// "created_at" field predicates.
|
// "created_at" field predicates.
|
||||||
CreatedAt *time.Time `json:"created_at,omitempty"`
|
CreatedAt *time.Time `json:"createdAt,omitempty"`
|
||||||
CreatedAtNEQ *time.Time `json:"created_at_neq,omitempty"`
|
CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"`
|
||||||
CreatedAtIn []time.Time `json:"created_at_in,omitempty"`
|
CreatedAtIn []time.Time `json:"createdAtIn,omitempty"`
|
||||||
CreatedAtNotIn []time.Time `json:"created_at_not_in,omitempty"`
|
CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"`
|
||||||
CreatedAtGT *time.Time `json:"created_at_gt,omitempty"`
|
CreatedAtGT *time.Time `json:"createdAtGT,omitempty"`
|
||||||
CreatedAtGTE *time.Time `json:"created_at_gte,omitempty"`
|
CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"`
|
||||||
CreatedAtLT *time.Time `json:"created_at_lt,omitempty"`
|
CreatedAtLT *time.Time `json:"createdAtLT,omitempty"`
|
||||||
CreatedAtLTE *time.Time `json:"created_at_lte,omitempty"`
|
CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"`
|
||||||
|
|
||||||
// "status" field predicates.
|
// "status" field predicates.
|
||||||
Status *todo.Status `json:"status,omitempty"`
|
Status *todo.Status `json:"status,omitempty"`
|
||||||
StatusNEQ *todo.Status `json:"status_neq,omitempty"`
|
StatusNEQ *todo.Status `json:"statusNEQ,omitempty"`
|
||||||
StatusIn []todo.Status `json:"status_in,omitempty"`
|
StatusIn []todo.Status `json:"statusIn,omitempty"`
|
||||||
StatusNotIn []todo.Status `json:"status_not_in,omitempty"`
|
StatusNotIn []todo.Status `json:"statusNotIn,omitempty"`
|
||||||
|
|
||||||
// .. truncated ..
|
// .. truncated ..
|
||||||
}
|
}
|
||||||
@@ -204,20 +204,20 @@ input TodoWhereInput {
|
|||||||
or: [TodoWhereInput!]
|
or: [TodoWhereInput!]
|
||||||
|
|
||||||
"""created_at field predicates"""
|
"""created_at field predicates"""
|
||||||
created_at: Time
|
createdAt: Time
|
||||||
created_at_neq: Time
|
createdAtNEQ: Time
|
||||||
created_at_in: [Time!]
|
createdAtIn: [Time!]
|
||||||
created_at_not_in: [Time!]
|
createdAtNotIn: [Time!]
|
||||||
created_at_gt: Time
|
createdAtGT: Time
|
||||||
created_at_gte: Time
|
createdAtGTE: Time
|
||||||
created_at_lt: Time
|
createdAtLT: Time
|
||||||
created_at_lte: Time
|
createdAtLTE: Time
|
||||||
|
|
||||||
"""status field predicates"""
|
"""status field predicates"""
|
||||||
status: Status
|
status: Status
|
||||||
status_neq: Status
|
statusNEQ: Status
|
||||||
status_in: [Status!]
|
statusIn: [Status!]
|
||||||
status_not_in: [Status!]
|
statusNotIn: [Status!]
|
||||||
|
|
||||||
# .. truncated ..
|
# .. truncated ..
|
||||||
}
|
}
|
||||||
@@ -267,7 +267,7 @@ The `Not`, `And` and `Or` operators can be added using the `not`, `and` and `or`
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
not: {
|
not: {
|
||||||
has_parent: true,
|
hasParent: true,
|
||||||
status: IN_PROGRESS,
|
status: IN_PROGRESS,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -280,7 +280,7 @@ When multiple filter fields are provided, Ent implicitly adds the `And` operator
|
|||||||
```graphql
|
```graphql
|
||||||
{
|
{
|
||||||
status: COMPLETED,
|
status: COMPLETED,
|
||||||
text_has_prefix: "GraphQL",
|
textHasPrefix: "GraphQL",
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
The above query will produce the following Ent query:
|
The above query will produce the following Ent query:
|
||||||
@@ -303,8 +303,8 @@ client.Todo.
|
|||||||
|
|
||||||
```graphql
|
```graphql
|
||||||
{
|
{
|
||||||
has_parent: true,
|
hasParent: true,
|
||||||
has_children_with: {
|
hasChildrenWith: {
|
||||||
status: IN_PROGRESS,
|
status: IN_PROGRESS,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user