withOrgInvitationID sets the ID field of the mutation.
(id uuid.UUID)
| 8166 | |
| 8167 | // withOrgInvitationID sets the ID field of the mutation. |
| 8168 | func withOrgInvitationID(id uuid.UUID) orginvitationOption { |
| 8169 | return func(m *OrgInvitationMutation) { |
| 8170 | var ( |
| 8171 | err error |
| 8172 | once sync.Once |
| 8173 | value *OrgInvitation |
| 8174 | ) |
| 8175 | m.oldValue = func(ctx context.Context) (*OrgInvitation, error) { |
| 8176 | once.Do(func() { |
| 8177 | if m.done { |
| 8178 | err = errors.New("querying old values post mutation is not allowed") |
| 8179 | } else { |
| 8180 | value, err = m.Client().OrgInvitation.Get(ctx, id) |
| 8181 | } |
| 8182 | }) |
| 8183 | return value, err |
| 8184 | } |
| 8185 | m.id = &id |
| 8186 | } |
| 8187 | } |
| 8188 | |
| 8189 | // withOrgInvitation sets the old OrgInvitation of the mutation. |
| 8190 | func withOrgInvitation(node *OrgInvitation) orginvitationOption { |
no test coverage detected