I am having trouble understanding how to set up virtual fields and/or mocking with Apollo Client and my graphql API (Appsync).
I have created a codesandbox here https://codesandbox.io/s/stoic-johnson-rkgmg?file=/src/EventList.js. This is a demo project where a list of events is fetched using Apollo client connected to a graphql endpoint.
I am doing everything described in the tutorial https://www.apollographql.com/docs/tutorial/local-state/#adding-virtual-fields-to-server-data and attempting to add the virtual field 'isRegistered' to the Schema type Event.
If you comment out EventList.js line 11 you can see the data (list of events) is fetched fine but as soon as I try to fetch my virtual field (be adding line 11 back in) I get no data back (and also no error).
I would really appreciate it if someone could tell me what I am doing wrong.
Thanks,