Mike-Gibson / mock-apollo-client

Helps unit test components which use the Apollo Client.
MIT License
117 stars 15 forks source link

Support Apollo Client v3 #16

Closed Mike-Gibson closed 4 years ago

Mike-Gibson commented 4 years ago

Updated apollo-client and related packages to the new @apollo/client

Fixes #11

Fairly straight forward update process. Only breaking behaviour in mock-apollo-client is the fact that @client directives are no longer passed down to the link - they are always removed beforehand. Previously, in v2, @client directives would be passed to the link when there were no client resolvers registered. Special handling previously existed to handle both of these cases, which is no longer required. This means that 'client only' query handlers can no longer be supported.