awslabs / aws-mobile-appsync-sdk-js

JavaScript library files for Offline, Sync, Sigv4. includes support for React Native
Apache License 2.0
921 stars 267 forks source link

Is it possible to add virtual fields supported by apollo? #417

Open waltermvp opened 5 years ago

waltermvp commented 5 years ago

Question,

Im using Amplify + Apollo with react-native and im wondering if it's possible to use virtual-fields when using amplify. If so how would I edit the client schema? Thanks

ziggy6792 commented 4 years ago

Did you ever find an answer to this? I am also wondering. Created an issue here https://github.com/apollographql/apollo-client/issues/6506

ziggy6792 commented 4 years ago

Someone on reddit gave me the solution. I was passing addtypename:false which was breaking everything.

You can see my fully working example using Appsync with virtual fields here. https://codesandbox.io/s/stoic-johnson-rkgmg?file=/src/EventList.js