// withGrantID sets the ID field of the mutation.
withGrantID sets the ID field of the mutation.
// withGrantID sets the ID field of the mutation .
func withGrantID(id string) grantOption {
	return func(m *GrantMutation) {
		var (
			err   error
			once  sync.Once
			value *Grant
		)
		m.oldValue = func(ctx context.Context) (*Grant, error) {
			once.Do(func() {
				if m.done {
					err = fmt.Errorf("querying old values post mutation is not allowed")
				} else {
					value, err = m.Client().Grant.Get(ctx, id)
				}
			})
			return value, err
		}
		m.id = &id
	}
}
func withGrantID ( id string ) grantOption { return func ( m * GrantMutation ) { var ( err error once sync . Once value * Grant ) m . oldValue = func ( ctx context . Context ) ( * Grant , error ) { once . Do ( func ( ) { if m . done { err = fmt . Errorf ( " " ) } else { value , err = m . Client ( ) . Grant . Get ( ctx , id ) } } ) return value , err } m . id = & id } }
withGrantID sets the ID field of the mutation.
withGrantID sets the ID field of the mutation .