apollostack - Apollo GraphQL: Schema for Query to Return Objects of Different Types? -
i have 3 different postgres tables, each containing different types of associates. database fields different each type-- that's why in 3 separate tables. i have 1 component can potentially access type of associate. seems examples i've encountered far, component typically associated 1 graphql query, e.g.: const withdata = graphql(getoneassociate_query, { options({ navid }) { return { variables: { _id: navid} }; } , props({ data: { loading, getoneassociate } }) { return { loading, getoneassociate }; }, }); export default compose( withdata, withapollo )(associateslist); and appears given graphql query, can return single type of record, e.g. in schema: getoneassociate(associatetype: string): [associateaccountingtype] question: possible design graphql schema such single query, can return objects of different types? resolver receive associatetype parameter tell postgres table reference. schema like, r...