Open tobiasfeil opened 4 years ago
Not really a codegen issue for now. The graphql operation doc is generated based on output of transformer. getXXX
queries are auto-generated by @model in graphql-transformer, from which there is a limitation that it cannot be used on an interface for now. One possible solution is that the model directive(or a new directive for interface) will add get queries for the related interface. FYI there is an ongoing RFC for transformer V2 here: aws-amplify/amplify-cli#6217
I'm currently modeling a scenario in this way:
I would like to be able to call
getPerson
from the frontend, and then handle the data depending on the type name.An alternative approach that would also solve my problem would be to enable this behavior for unions.