ios-oss
ios-oss copied to clipboard
MBL-915: Replace GraphQLSelectionSet extension with testGraphObject function
📲 What
Replace the GraphQL mock helper code in extension GraphQLSelectionSet with generic global functions, called testGraphObject.
🤔 Why
Apollo 1.x replaces GraphQLSelectionSet. That means that, when we upgrade, this extension was no longer going to work.
By moving this helper code into a small collection of global functions, we add a small layer of abstraction between Apollo's internal behavior and our test code. This it make it be much easier to fix this test code when we upgrade to Apollo 1.x and beyond - since we can fix it in 3 functions, and not all across our test code.