relay-tools / relay-hooks

Use Relay as React hooks
https://relay-tools.github.io/relay-hooks/docs/relay-hooks.html
MIT License
540 stars 56 forks source link

Removed the MutationConfigWithVariables type as it is not needed #149

Closed morrys closed 3 years ago

morrys commented 3 years ago

related: https://github.com/relay-tools/relay-hooks/pull/141

// good
const [mutate] = useMutation(mutation);
mutate({variables: {}});

// error
const [mutate] = useMutation(mutation);
mutate({});

// good
const [mutate] = useMutation(mutation, {variables: {}});
mutate();

// good
const [mutate] = useMutation(mutation, {variables: {}});
mutate({variables: {}});

@andrehsu if you can take a look at this PR 👍

andrehsu commented 3 years ago

@morrys looks good to me