mutation {Object}
: A mutation gql objectdefaultValue {Any}
: The value passed to input controlvariables {Object}
: For gql variables (don't need the top levelvariables
key)valuePath {String}
: Point to the variables for changing value insidemutateEvent {String}
: Ex.blur
/change
, for indicate which event your want to fire the mutation
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { Input } from 'react-apollo-forms';
import updateMutation from './update.gql';
export default class ColumnDetail extends Component {
const name = 'Barry Allen';
render() {
return (
<Input
mutation={updateMutation}
defaultValue={name}
variables={{
id: 1,
}}
valuePath="name"
mutateEvent="blur"
/>
);
}
}