We have remote schema already. We get Apollo datasource response by hitting the REST APIs using apollo-datasource-rest. The format of the json response does not match the schema. The task is to transform the json response to match the schema and return the result against the user query. How to achieve this?
E.g REST API response:
{
"members": {
"name": "john",
"street_address": "10 Barley St."
}
}
Our remote graphql schema:
type Users {
username: String!
street: String!
}
Any ideas or help or source code is highly appreciated. Thanks again.