/
gql_mutation_input.go
43 lines (35 loc) · 1.14 KB
/
gql_mutation_input.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Code generated by ent, DO NOT EDIT.
package ent
// CreateUserInput represents a mutation input for creating users.
type CreateUserInput struct {
Email string
}
// Mutate applies the CreateUserInput on the UserMutation builder.
func (i *CreateUserInput) Mutate(m *UserMutation) {
m.SetEmail(i.Email)
}
// SetInput applies the change-set in the CreateUserInput on the UserCreate builder.
func (c *UserCreate) SetInput(i CreateUserInput) *UserCreate {
i.Mutate(c.Mutation())
return c
}
// UpdateUserInput represents a mutation input for updating users.
type UpdateUserInput struct {
FirstRun *bool
}
// Mutate applies the UpdateUserInput on the UserMutation builder.
func (i *UpdateUserInput) Mutate(m *UserMutation) {
if v := i.FirstRun; v != nil {
m.SetFirstRun(*v)
}
}
// SetInput applies the change-set in the UpdateUserInput on the UserUpdate builder.
func (c *UserUpdate) SetInput(i UpdateUserInput) *UserUpdate {
i.Mutate(c.Mutation())
return c
}
// SetInput applies the change-set in the UpdateUserInput on the UserUpdateOne builder.
func (c *UserUpdateOne) SetInput(i UpdateUserInput) *UserUpdateOne {
i.Mutate(c.Mutation())
return c
}