apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Invalid prop: type check failed for prop "refetchQueries". Expected Function, got Array

Open brettins opened this issue 3 years ago • 0 comments

Describe the bug Getting a warning that refetchQueries from an ApolloMutation component is expecting a function and not an array. Invalid prop: type check failed for prop "refetchQueries". Expected Function, got Array

The documentation for vue links to the react apollo docs where it describes passing an array of objects and strings, not functions.

To Reproduce Steps to reproduce the behavior:

  1. Create a mutation component with a refetchQueries value, pass it an array of strings like ['NameOfQueryToRefetch']

Expected behavior That, as per the documentation, refetchQueries takes an array of objects and/or strings.

Versions vue: 2.6.14 vue-apollo: 3.1.0 @apollo/client: 3.5.7

brettins avatar Jun 08 '22 18:06 brettins